We need to upload multiple files of different types, is there a module that will check for valid mime types and upload only the valid files, (based on site settings, eg: png, doc, jpg, txt) ?


6 Answers 6


clientside_validation (drupal-6 and drupal-7) performs some additional client-side checks, including checks on uploaded file extensions (but not MIME Types). (And, as @tim.plunkett mentioned in the comments, mimedetect is useful for server-side MIME Type validation, but the file must be uploaded to the server in order to be validated.)

For uploading multiple files, consider the following:

  • swfupload (drupal-6; Flash)
  • plupload (drupal-6 and drupal-7; Flash and several other technologies supported; new/under development)

For uploading multiple images, additionally consider these:

  • image_fupload (drupal-6; uses swfupload above)
  • jifupload (drupal-5 and drupal-6; free; uses Java applet)
  • aurigma (drupal-6; software purchase / service subscription required)
  • 2
    I asked about mime-types because I've read that using them is a better practice than just checking file extensions. Mar 3, 2011 at 18:12
  • @palhmbs - You read correctly. You should always check the mime type of uploaded files.
    – Christian
    Mar 13, 2011 at 23:42
  • 1
    Any of the above modules could integrate with MimeDetect and handle that for you. Mar 15, 2011 at 19:12
  • If you're willing to extend clientside_validation to make use of mimedetect, please post the code somewhere and let us add the feature for general public use. Mar 16, 2011 at 17:49

We've had excellent luck with Plupload. It bends over backwards to achieve cross-browser compatibility, using Silverlight, Flash, HTML5, and falling back to classic HTML4 'select file' widgets depending on the browser's capabilities.

The Drupal integration module is a bit rough, but we've used it successfully on a number of large projects to populate Image Fields. In Drupal 7, I believe they've pulled most of the UI and turned it into a pure API module that can be used by tools like Media simply to handle the uploading work. If you want to do anything particularly funky, you'll probably have to write a bit of custom code to handle where the upload widget gets displayed, but it's very solid.

We've managed to tie into its internal events to handle quite a bit of post-processing, and checking for MIMEtypes/kicking back validation errors could probably be done without too much tinkering.


Here's my comparison wiki in the Similar Module Review group. http://groups.drupal.org/node/155764

Dumping the content here as it is now...

Aurigma Mass Uploader for CCK (6.x-2.0) The Aurigma Uploader for Imagefield module integrates the commercial Aurigma Image Uploader with Drupal. Multiple images are uploaded in a single batch into a multiple imagefield.

Image FUpload (6.x-3.0-rc2) Image FUpload (Multiupload) which is an addition to image and CCK's imagefield module, gives the ability to every user who is allowed to upload images by using image module or imagefield module, to upload multiple images with one simple click. All selected images are uploaded via a flash module (swfupload) and are automatically processed.

Plupload integration (6.x-1.x-dev, 7.x-1.0-beta3) Provides integration between for the Plupload widget to upload multiple files and Drupal. Plupload is a GPL licensed multiple file uploading tool that can present widgets in Flash, Gears, HTML 5, Silverlight, BrowserPlus, and HTML4 depending on the capabilities of the client computer.

SWFUpload (6.x-2.0-beta8) The SWFUpload module for Drupal provides a widget for CCK's Filefield and uses the SWFUpload library to allow multiple file uploads simultaneous.

jUpload for Imagefield (6.x-1.x-dev) Have you ever wished you could upload a group of images at once to an imagefield? The jUpload for Imagefield module (jifupload) integrates the JUpload Java applet with the ImageField module for CCK. Multiple images are uploaded in a single batch into an imagefield set for multiple values.

Different approach, same outcome...

ImageField zip support (6.x-1.0-beta2) This is a helper module for ImageField. When uploading multiple images for imagefields with multi-values, this module adds the ability to upload multiple images in zip files instead of individually.

Imagefield Import (5.x-1.5, 6.x-1.10) Imagefield Import allows users with the proper permissions to import a large number of images into a CCK content type which contains a filefield or an imagefield. The module can grab titles and descriptions using EXIF or IPTC. Note: To use this module you must be able to upload images to your server via FTP, SCP, or other methods.


Another one for images that isn't supported very well but does work is ImageField zip support

  • ImageField Zip has been re-born it's a lot nicer now
    – mikeytown2
    Oct 5, 2011 at 1:43

If you can put these files into a zip, and you want/have to use core Upload module, you can try Multiple Upload Alone (Drupal 6.x).


HTML5 Upload http://drupal.org/sandbox/z7/1348240

This modules should be regarded a streamlined solution for batch-uploading of images (and other files) for Drupal 7 in modern (HTML5 compliant) browser, nothing more.

Didn't try yet but the code is clear and compact.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.