Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How can we restrict any file to upload into damadmin in a particular folder in touch UI?

GauravKumar
Level 2
Level 2

Hi guys,

I want to upload only pdfs in my folder as under dam/test in touch UI and restrict to other files like xml,doc etc. I have tried that at this path /libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/fileupload I have add a property mimyType= application/pdf but the problem is that because of this property, restriction is available for all folder but I want only a particular folder.

So can anyone please help me for this.

2 Replies
smacdonald2008
Level 10
Level 10

There is a similar thread there: Restrict file uploads by size & type in DAM upload dialog

The best way to restrict a file is to write a custom Sling Servlet as mentioned in that thread.

GauravKumar
Level 2
Level 2

This is fine but my requirement is that when we go to the dam console in touch UI and we click on create button and then file at that time I want that I will be able only pdfs files not other type of file. And as I already discuss that when I add the property mimeType = application/pdf on the fileupload node, then I am able to select only pdfs but using this approach, this restriction will be for every folder But I want this only for my folder.