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.
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.
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.
Hi @annyreddy ,
You can also overlay the js file which is responsible for doing the validation and add your special characters in the list.
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...