Hi All,
If anyone implement or have idea on restricting special chanracters for filenames for assets Please let me know. Business users sometimes uploading files with special characters with asset files using touch UI and they are creating some issues. I wanted to to restrict such kind of situations.
I did some analysis on fileupload.js to restrict some characters but for some reason it is not working as I expected.
If any thoughts or suggestions on this implementation really help me.
Solved! Go to Solution.
Hi @Anny0505,
As you already know that the assets are uploaded in /content/dam. Hence, we can use the Event handling approach.
You can refer to my post on different annotations here.
Hope this helps.
Thanks,
Kiran Vedantam.
You can write a request filter to validate the asset before it gets uploaded in AEM.
You can find a sample of that filter here - http://experience-aem.blogspot.com/2018/11/aem-6420-file-decode-filter-virus-scan-to-decode-uploaded...
@Kunal_Gaba_, Thank you.
I believe this is really good and helpful information.
Thanks a lot. I am going to try this and update you.
Sorry, If it is a dumb question, let's say I have implemented a filter to check the filename special chars and It is successfully removed characters from the filename. after that how to redirect to create asset servelet. Do I need to take any extra things to take care?
Thanks,
Aruna
Hi @Anny0505,
As you already know that the assets are uploaded in /content/dam. Hence, we can use the Event handling approach.
You can refer to my post on different annotations here.
Hope this helps.
Thanks,
Kiran Vedantam.
Thank you very much for your suggestion. I really appreciate it.
When I upload assets into AEM DAM I am doing few extra operations such as running Graphics magics commands and writing the asset to another static server.
Because of these 2 operations, I am a little worried about the event listeners approach.
Otherwise, it is a really good suggestion and I am sure it is going to fix my issue if I don't have extra operations on the asset.
I also tried with Upload file JS but it is not helpful in case if I have china characters in filenames.
If you have any other solutions/suggestions please let me know.
Thank you once again.
Hi @Anny0505 ,
You can also overlay the js file which is responsible for doing the validation and add your special characters in the list.
Please refer to this - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/extending-file-name-valida...
You can configure the Day CQ DAM Asset Upload Restriction service from the OSGI console http://localhost:4502/system/console/configMgr/com.day.cq.dam.core.impl.mimeType.AssetUploadRestrict...
To restrict users to upload files of certain MIME types only, unselect the allow all MIME option and specify allowed MIME types in the Allowed Asset MIMEs (regex) fields using regular expressions.
Views
Likes
Replies