Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How catch image upload event (document library) and create copy of it?
Hello!
How to be with the following idea?
When user upload a new image into the document library I want automatically create copies of the original one, but with different sizes
I don't know in what direction to go to achieve it
Could someone help me, please?
I guess I have to catch image upload event, do some logic to create new images, save them and continue the original action
But I have zero ideas about how this module should look, do I need to override some service? if yes, which one? Any other advice
Thanks a lot in advance
How to be with the following idea?
When user upload a new image into the document library I want automatically create copies of the original one, but with different sizes
I don't know in what direction to go to achieve it
Could someone help me, please?
I guess I have to catch image upload event, do some logic to create new images, save them and continue the original action
But I have zero ideas about how this module should look, do I need to override some service? if yes, which one? Any other advice
Thanks a lot in advance
Hi ,
You can write Liferay Service Wrapper for DLAppService , whenever an image is uploaded it will call its respected method and you can write your custom logic for creating images of diff sizes inside it.
You can refer below link for creating service wrapper
https://help.liferay.com/hc/en-us/articles/360018159951-Overriding-Liferay-Services-Service-Wrappers-
You can write Liferay Service Wrapper for DLAppService , whenever an image is uploaded it will call its respected method and you can write your custom logic for creating images of diff sizes inside it.
You can refer below link for creating service wrapper
https://help.liferay.com/hc/en-us/articles/360018159951-Overriding-Liferay-Services-Service-Wrappers-
I got the idea. Thank you!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™