These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Allowed types for uploading / AllowedFilePattern for listing

I need just a list of filetypes being allowed for uploading. This is resolved with AllowedTypes

*.jpg;*.rar;*.doc


But, how can I configure the filevistacontrol for listing just the filepattern I need:

12345*.*


I need two options (filetypes) in the configuration section of the filevistacontrol: one for allow uploading, and second one for listing. They are 2 different types.
Benito Lopez 11/29/2009 11:14 PM
This is described in Example 1:

AllowedFileTypes property accepts a semi-colon separated list of file extensions (eg. *.doc; *.xls; *.jpg, *.pdf) that are allowed in the root folder. This property restricts all file actions (List, Delete, Rename, Copy, Move, Extract, Compress and Download) along with Upload action. This means only allowed file types will be visible and manageable in the file listing. If omitted, any file type (ie. *) is allowed. Note that you can also define the allowed file names and not the extensions only. For instance, you can use * in any part of the filename such as picture*.jpg which matches "picture34.jpg" or "picture 112.jpg" or use it in the extension such as *.jp* which matches "file.jpg", "file.jpe" or "file.jpeg".
Cem Alacayir 1/15/2010 4:43 PM
Thanks for reply.

I got it, but the explanation is for the allowed file types in general.

I explain what I want to do:

1) I need to upload to /app/files/  all files *.jpg, *.gif, *.txt (this is defined in AllowedFileTypes 
2) When I upload the file I change the name, adding a UserId to it.  original: rr.gif, tt.jpeg,oo.txt   final:123_rr.gif, 123_tt.jpg,123_oo.txt
3) But when the user sees the explorer, he must (list, delete, etc) only 123*.*, even if he can upload *.gif, *.txt, *.jpg (Where can I define this? AllowedFileTypes ?)

Benito Lopez 1/16/2010 6:07 AM
Sorry but it's not possible to define a separate allowed list as of current version. Maybe you should arrange your folder structure to accomplish the same goal. You can create root folders dynamically according to the user id or user name. Please see the below topic:
Different root folder for each user
Cem Alacayir 1/16/2010 8:14 AM