Drupal 7 – Handling file uploads – allowed file extensions
While working with custom forms with file upload fields in drupal, you may sometimes get a error regarding extensions:
The specified file “your file name here” could not be uploaded. Only files with the following extensions are allowed: “jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp”
To allow all extensions, you have to manually set the ‘file_validate_extensions’ validator to an empty array.