Control which file extensions can be uploaded

Jun 9, 2008 at 3:56 PM
Is there any way to limit what file extensions can be uploaded?  (E.g., only allow .DOCX, .JPG, etc.).  Currently I handle the filtering in the FileReceived event and throw an exception on dispermitted file types.

Thank you in advance.
Coordinator
Jun 10, 2008 at 10:21 PM
The current version does nto have this implemented. If you want to do that go to swf/Classes/com/flajaxian/FileUploader.as and change 
 public function browse():Void {
  if(this._debug) Debug.trace("FileUploader.browse");
  this._fileReferenceList.browse();
 }
method passing there the file types as described here http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002228.html and of course you'd have to recompile the flash and the project
Coordinator
Jun 23, 2008 at 5:38 AM
In the change set 11489 or later you can find AllowedFileTypes property that can be used to limit the allowed file types.

The format is as follow:
[File Group 1 Name][FileType1;FileType2;FileType3][MAC types],[File Group 2 Name][FileType1;FileType2;FileType3][MAC types]

for example if you want two file froups: "Image files" and "Flash Movies" you would use:
AllowedFileTypes="[Image Files][*.jpg;*.jpeg;*.gif;*.png][JPEG;jp2_;GIFf;PNGf],[Flash Movies][*.swf][SWFL]"

you can also omit the Mac types for example:
AllowedFileTypes="[Images][*.jpg;*.jpeg;*.gif;*.png]"