- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- HTML5/Flash Uploader
- Before You Started with HTML5/Flash Uploader
- HTML5/Flash Uploader Architecture
- HTML5/Flash Uploader User Interface
- Getting Started
- Using HTML5/Flash Uploader
- Troubleshooting
- Reference
- HTML5/Flash Uploader ASP.NET Reference
- Aurigma.ImageUploaderFlash Namespace
- AddFilesProgressDialog Class HTML5/Flash Uploader ASP.NET
- AllFilesUploadedEventArgs Class HTML5/Flash Uploader ASP.NET
- BaseClientControl Class HTML5/Flash Uploader ASP.NET
- BaseClientEvent(T) Class HTML5/Flash Uploader ASP.NET
- BaseControl Class HTML5/Flash Uploader ASP.NET
- BaseExtender Class HTML5/Flash Uploader ASP.NET
- BaseUploadControl Class HTML5/Flash Uploader ASP.NET
- BaseUploaderExtender Class HTML5/Flash Uploader ASP.NET
- ClientEvent Class HTML5/Flash Uploader ASP.NET
- ClientEventCollection Class HTML5/Flash Uploader ASP.NET
- ClientEventNames Enumeration HTML5/Flash Uploader ASP.NET
- CommonDialog Class HTML5/Flash Uploader ASP.NET
- CompletionCodeBlock Delegate ActiveX/Java Uploader ASP.NET
- ConvertedFile Class HTML5/Flash Uploader ASP.NET
- ConvertedFileCollection Class HTML5/Flash Uploader ASP.NET
- Converter Class HTML5/Flash Uploader ASP.NET
- ConverterCollection Class HTML5/Flash Uploader ASP.NET
- DebugScriptMode Enumeration HTML5/Flash Uploader ASP.NET
- DescriptionEditor Class HTML5/Flash Uploader ASP.NET
- DrawTool Class HTML5/Flash Uploader ASP.NET
- FileUploadedEventArgs Class HTML5/Flash Uploader ASP.NET
- FlashControl Class HTML5/Flash Uploader ASP.NET
- FolderProcessingMode Enumeration HTML5/Flash Uploader ASP.NET
- ImageEditor Class HTML5/Flash Uploader ASP.NET
- ImagePreviewWindow Class HTML5/Flash Uploader ASP.NET
- ImageUploaderFlash Class HTML5/Flash Uploader ASP.NET
- Language Enumeration HTML5/Flash Uploader ASP.NET
- Messages Class HTML5/Flash Uploader ASP.NET
- Metadata Class HTML5/Flash Uploader ASP.NET
- Package Class HTML5/Flash Uploader ASP.NET
- PaneItem Class HTML5/Flash Uploader ASP.NET
- PaneViewMode Enumeration HTML5/Flash Uploader ASP.NET
- PostFields Class HTML5/Flash Uploader ASP.NET
- ProgressBytesMode Enumeration HTML5/Flash Uploader ASP.NET
- ResizeQuality Enumeration HTML5/Flash Uploader ASP.NET
- Restrictions Class HTML5/Flash Uploader ASP.NET
- Restrictions Members HTML5/Flash Uploader ASP.NET
- Restrictions Methods HTML5/Flash Uploader ASP.NET
- Restrictions Properties HTML5/Flash Uploader ASP.NET
- DeniedFileMask Property HTML5/Flash Uploader ASP.NET
- EnableCmyk Property HTML5/Flash Uploader ASP.NET
- FileMask Property HTML5/Flash Uploader ASP.NET
- MaxFileCount Property HTML5/Flash Uploader ASP.NET
- MaxFileSize Property HTML5/Flash Uploader ASP.NET
- MaxImageHeight Property HTML5/Flash Uploader ASP.NET
- MaxImageWidth Property HTML5/Flash Uploader ASP.NET
- MaxTotalFileSize Property HTML5/Flash Uploader ASP.NET
- MinFileCount Property HTML5/Flash Uploader ASP.NET
- MinFileSize Property HTML5/Flash Uploader ASP.NET
- MinImageHeight Property HTML5/Flash Uploader ASP.NET
- MinImageWidth Property HTML5/Flash Uploader ASP.NET
- SortDirection Enumeration HTML5/Flash Uploader ASP.NET
- SortMode Enumeration HTML5/Flash Uploader ASP.NET
- StatusPane Class HTML5/Flash Uploader ASP.NET
- ThumbnailFitMode Enumeration HTML5/Flash Uploader ASP.NET
- TopPane Class HTML5/Flash Uploader ASP.NET
- UploadedFile Class HTML5/Flash Uploader ASP.NET
- UploaderModule Class HTML5/Flash Uploader ASP.NET
- UploadErrorDialog Class HTML5/Flash Uploader ASP.NET
- UploadHandler Class HTML5/Flash Uploader ASP.NET
- UploadPane Class HTML5/Flash Uploader ASP.NET
- UploadRequest Class HTML5/Flash Uploader ASP.NET
- UploadSettings Class HTML5/Flash Uploader ASP.NET
- Aurigma.ImageUploaderFlash.AmazonS3 Namespace
- Aurigma.ImageUploaderFlash.AmazonS3.Design Namespace
- Aurigma.ImageUploaderFlash Namespace
- HTML5/Flash Uploader PHP Reference
- HTML5/Flash Uploader JavaScript Reference
- HTML5/Flash Uploader Client-Side Events Reference
- POST Field Reference
- HTML5/Flash Uploader ASP.NET Reference
- Licensing Information
- Legal Notices
Restrictions.FileMask Property HTML5/Flash Uploader ASP.NET
Gets or sets a file mask for files allowed for upload.
Namespace:
Aurigma.ImageUploaderFlash
Assembly:
Aurigma.ImageUploaderFlash (in Aurigma.ImageUploaderFlash.dll)
Syntax
public string FileMask { get; set; }
Property Value
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:
- Description string displayed in the drop-down filter list in the open file dialog.
-
List of file masks separated by semicolons. A file mask has the
*.<extension name>format, where asterisk*is an arbitrary file name.
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.
In Flash Uploader a file mask with a long description can work incorrectly due to Firefox limitations. Thus, we recommend setting description as short as possible.
For example, ["Documents", "*.txt;*.rtf;*.pdf;*.doc;*.docx;*.xls;*.xlsx"] works correctly
but ["Documents (*.txt;*.rtf;*.pdf;*.doc;*.docx;*.xls;*.xlsx)", "*.txt;*.rtf;*.pdf;*.doc;*.docx;*.xls;*.xlsx"] does not.
Due to browsers limitations, HTML5 Uploader ignores filter descriptions specified in settings and displays text strings predefined in a web browser. Even though descriptions are ignored, they are still required in parameters since Flash Uploader, which can be launched as a fallback option, supports them.
Due to Firefox security features, HTML5 Uploader always adds *.* mask to the file filter in this browser and makes it selected by default.
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 "[]".
Remarks
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.
See Also
Reference
- Restrictions Class
- Aurigma.ImageUploaderFlash Namespace
- Restrictions..DeniedFileMask
- $au.restrictions.fileMask JavaScript Property HTML5/Flash Uploader
- Restrictions.FileMask PHP Property HTML5/Flash Uploader