How to display only certain files in File Ultimate?
Question asked by Naveen - July 26 at 2:01 PM
Answered
Hi,

I have a folder inside the App_Data/RootFolder1 having 100 files(the combination of jpg, tiff & pdf files). The requirement is to show only those pdf having prefix xxx_Filename.pdf

So let's suppose I have 5 files-
abc.pdf
bcd.pdf
xxx-abc.pdf
xxx-qwerty.pdf

So how to show only xxx-abc.pdf, xxx-qwerty.pdf in the File Ultimate/manager. So that user could see the files, he could download the files & if needed he could also delete the files.

Please help me.

1 Reply

Reply to Thread
1
Cem Alacayir Replied
Employee Post Marked As Answer
Did you check the documentation?


AllowedFileTypes
Gets or sets the file patterns that are allowed. This property restricts all actions (List, Delete, Rename, Copy, Move, Extract, Compress, Download and Upload). This means only allowed file types will be visible and manageable in the file list. If not set, any file type is allowed ("*"). When combining patterns in string representation, they should be separated by vertical bar (|).
In a pattern, you can use these wildcards:
  • *    matches zero or more characters.
  • ?    matches exactly one character.

Some pattern examples:
  • *.* matches files with any extension (does not match files without an extension)
  • *.jpg    matches files only with jpg extension
  • picture*.jpg    matches files only with jpg extension and which names start with 'picture'
  • picture.*    matches files with any extension and which names start with 'picture'
  • picture    matches files with no extension and which names are exactly 'picture'
  • *.jp*    matches files like 'picture.jpg', 'otherpicture.jpe', 'somepicture.jpeg' etc.
  • *.jp?    matches files like 'picture.jpg', 'otherpicture.jpe' etc.
  • picture?.jpg    matches files like 'picture1.jpg', 'picture2.jpg', 'pictures.jpg' etc.

So you can do this:

accessControl.AllowedFileTypes = "xxx-*.pdf";


Reply to Thread