We have a requirement to restrict file uploads in DAM by a maximum file size and white list of valid file types. I cannot find any Adobe documentation regarding this subject. Is there a configuration that can control these parameters? If not, what would need to be done to restrict DAM uploads by these parameters?
Views
Replies
Total Likes
I posted following answer to the same question in another thread- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...
I don't know whether there is any OOTB configuration to limit the file types. But there is a community article for restricting the upload based on size of the file - http://experience-aem.blogspot.com/2014/12/aem-6-sp1-classic-ui-restrict-large-or-small-files-upload.... You can customize it and add your logic of checking the file types. You can either just check the file extensions in the javascript or invoke a backend servlet to check the file headers for the mime types. Also, this is limited to Classic UI only.
Views
Replies
Total Likes
If you refer the OOB workflow 'DAM Update Asset' workflow, there you can configure which file types should be allowed. Similarly, you can write custom workflowprocess service to check the type and size of the asset and restrict the uploads accordingly.
Views
Replies
Total Likes
Hi
As mentioned by Kunal, you can follow the article :-
Or
You could create a custom sling servlet, that will upload assets for you. There you can insert you logic to restrict anything.
Link:- https://helpx.adobe.com/experience-manager/using/uploading-files-aem1.html
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
If I were to write my own upload servlet, how would I remove access to the default file upload? Would that be done with user permissions?
Views
Replies
Total Likes
If you write your own upload servlet to handle DAM assets - you have full control over what gets placed into the DAM. You can also use the AssetManager API.
com.day.cq.dam.api.AssetManager assetMgr = resourceResolver.adaptTo(com.day.cq.dam.api.AssetManager.class);
String newFile = "/content/dam/travel/"+fileName ;
assetMgr.createAsset(newFile, is,"image/jpeg", true);
We have an example of a custom Servlet that uses the AssetManager API here:
https://helpx.adobe.com/experience-manager/using/uploading-files-aem1.html
Views
Replies
Total Likes
Please check with Adobe for hotfix (71519).This will allow you to configure the allowed MIME types.
Views
Replies
Total Likes
I have implemented for a similar scenario long time back. Please drop me an email at gameon300@gmail.com if you still need help with this as your posted question is pretty old as I can see.
Regards,
Samir
Views
Replies
Total Likes
$@^^!R wrote...
I have implemented for a similar scenario long time back. Please drop me an email at gameon300@gmail.com if you still need help with this as your posted question is pretty old as I can see.
Regards,
Samir
Hi Samir
It would be a great help, if you can share the solution with us here in the community for communities benefit.
~kautuk
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @lone_Ranger ,
Looks like it's known issue since long time.
You can find same question being asked in below thread long back,
Was there any fix ever provided?
@kautuk_sahni can you pls confirm?
Thanks,
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies