Gets or sets a file mask for files allowed for upload.
Namespace:
Aurigma.ImageUploaderFlash
Assembly:
Aurigma.ImageUploaderFlash (in Aurigma.ImageUploaderFlash.dll)
public string FileMask { get; set; }
Type: System..::..String
A file mask for files allowed for upload. The property value is a JSON string that contains array of filters. Each item consists of two elements:
For instance, a filter can be set as follows: [["Images", "*.jpg;*.png"], [...]], where "Images" is a description, and "*.jpg;*.png" is a file mask.
Even if a user chooses files that do not meet FIleMask's requirements, Uploader sorts out the chosen files before adding them to the Upload Pane.
Instead of specifying a double array, you can just set a string with the single mask. However it will be incompatible with Flash uploader.
Default value is "[]".
When opening a File Open Dialog in HTML5, it is necessary to specify a filter as a set of MIME types rather than file masks. HTML5 Uploader converts most popular file masks to appropriate file types automatically, but some exotic file extensions are not supported. In this case, you can configure a mapping between a file mask and MIME type manually, using Aurigma.MimeMapping collection, as follows:
Aurigma.MimeMapping["*.smth"] = "application/vnd.aurigma-stuff";
Note, you should call this code before the uploader is initialized, for example, in the InitComplete event.