Hello, I need to validate json/yaml files prior to loading it to the assets in AEM 6.5, if the file is not valid than show an error to the author, if it is valid than just upload it. Right now I am trying to overlay and customize the upload.js file which is meant for handle the "Upload" button, if the file is in the myproject folder and it is json/yaml, then send it to the servlet for validation. Is it ok? Is there a better approach?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @agyrki ,
Yes overlaying upload.js and then making a call to your servlet for validation is the right approach, adding a check for only your required filetypes.
Thanks.
Hi @agyrki ,
Yes overlaying upload.js and then making a call to your servlet for validation is the right approach, adding a check for only your required filetypes.
Thanks.
Hi @agyrki
The other option would be to customize the DAM Update Asset workflow to include a process step which can invoke the servlet to perform the file type validation and then terminate the workflow if the file is not valid or proceed with next steps incase of valid file scenario.
Hope this helps!
Thanks
Narendra
@agyrki Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies