This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hi,
Solved! Go to Solution.
Views
Replies
Total Likes
There is a community article that shows how to upload bulk images to the AEM DAM:
http://scottsdigitalcommunity.blogspot.ca/2013/10/automating-process-of-uploading-digital.html
Views
Replies
Total Likes
I assume you are uploading to the DAM. Look at this Java class:
http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/api/DamEvent.Type.html
Views
Replies
Total Likes
There is a community article that shows how to upload bulk images to the AEM DAM:
http://scottsdigitalcommunity.blogspot.ca/2013/10/automating-process-of-uploading-digital.html
Views
Replies
Total Likes
Hi,
Thanks for your response.yes i am uploading images into dam only and i know for each image we can capture the upload event. but for me i want to know is there any event for bulk upload ? for example,assume author uploaded 10 images at a time i need to capture that as one event
because my job is to send a email immediately with all the images link after they got uploaded into dam.so if any event like above exist i can write listener for that.
Regards,
Sainath
Views
Replies
Total Likes
The key word here is "immediately", that we all know to be highly relative. ;)
I have done similar functionality for other systems where they want to get notification when all the reports have been imported to the system. The trick here is to observe the behaviour pattern of the usage. In my case, we could see that whenever a new report and settlement collection was uploaded, it never took more than 1 second beteween the uploads and they alway shared the same parent. Yes, most of the time, multiple source systems started to upload at the same time, but to different targets.
This is what I would do in your case: Implement the listener as you have started in the last post. In that, make sure that you have a class that you can access using a key. I would use the path or maybe the parent path as a "collector identfication". Then you can implement different strategies. Say that you want to send a mail every 10:th upload in on the path /content/dam/secure-images/. That could be one strategy that just counts the number of times that collection has had a file added to it.
In your case, the strategy you should implement is the "WaitAndSee"-strategy. Well... I know that if one of the kids starts to yell, I can either run there imediatelly... or just wait and see if the other one starts to before I take action. Same with your uploads. If you wait until the bulk upload in the DAM (most likely over WebDav) is silent for 10 seconds and then send the mail, in my world, that would cound as "immediately".
/Ove
Views
Replies
Total Likes
AFAIK there is no event for bulk upload.
Views
Replies
Total Likes
Hi Sainath and Other,
Would you please share your code to capture the upload event for the each image?
I need help your help to customize image upload event for CQ 5.6.1
Thanks
Shovon
Views
Replies
Total Likes
Hi Shovonz,
I did not understand what do you mean by "customize image upload event for CQ 5.6.1". but if you are requirement is to do some processing based on each image upload then the solution is to write Event Handler. The sample code for event handler is
@Component @Service @Property(name="event.topics",value= {Event.NODE_ADDED},path="/content/dam") public class ExampleEventHandler implements EventHandler { Logger log = LoggerFactory.getLogger(this.getClass()); public void handleEvent(Event event) { // write your logic here } }
Regards,
Sainath Appam
Views
Replies
Total Likes