A look at uploading files in Drupal

Yesterday a client of mine asked how to upload image files for a drupal site that didn’t have TinyMCE installed (with IMCE). At first I was confused since I’m very careful to install those modules for all of the sites I create but then the client stated that this was for a site I didn’t create (phew). For Drupal pros this might seem like an odd question but it’s really not and I had the exact same question when I first started working with Drupal.

It turns out there’s three main ways to upload files to drupal.

  1. The Core File Upload Module
  2. A CCK Field Field to upload files
  3. A WYSIWYG editor with upload capeabilities (See TinyMCE above)

Since the client stated #3 wasn’t available on this site I was only left with options 1 and 2.

I explained them as: #1 is probably the esiest since there’s nothing to download and nothing really to modify. The only drawback to this method is it attaches the file(s) at the end of the node in a manor similar to email and you’ll have to manually create your HTML in the node’s body if you want to refrence it (like an image). #2 is the more involved implementation since you’ll need to download the module, install it, configure it for your nodes and then mess with how it’s displayed.

Now don’t get me wrong, I use option #2 all the time for the sites I create but it is a more involved process that isn’t for the novice. After giving the options the client chose option #1 and all I had to do was guide them where the file was stored so they could reference it with their HTML.

Short version of this post. I recommend option #3 but if you can’t do that, chose #1 if you are novice or #2 if you are more adept at modifying Drupal.