Table Of Contents
 

PFU: Filtering File Uploads

Filtering Files


You can tell ProFlashUpload that you only want a certain type of file with the filter attribute.
For example, to limit the user to only uploading image files, use:

    filter="All Images,*.jpg;*.jpeg;*.png;*.gif"

You can also pass different filter names in the following format:

    filter="PDF Documents,*.pdf,Word Documents,*.doc;*.docx,Excel Documents,*.xls"

    Note the extension list is semi-colon separated.

Permissions
  filter String File extension filter. Should be in the format "Type","Extention"... NO All Files,*.*


Blocking Unwanted Files


It is important that you prevent files that could compromise your server's security from uploading. To this end, ProFlashUpload has an option to specify a list of file types that you DO NOT WANT to allow to upload to the server.

The attribute to pass in this list blockExtensions and in the latest version of ProFlashUpload it defaults to "cfm,cfml,exe,cgi,php,php3,asp,aspx,cmd,sys". So files of type "exe" such as "virus.exe" will not be allowed to upload.

Permissions
  blockExtensions String Any files with these extensions will be prevented from uploading to the server. This is done for security, the default list are some common executable files. NO cfm,cfml,exe,cgi,php,php3,asp,aspx,cmd,sys