Uploading multiple images to Drupal in OS X

 For those using OS X, I've written a tiny little AppleScript program to upload a directory of images into Drupal's Image resource editor using Safari (it could probably be edited to use Firefox). It isn't very robust, and needs a little help to get started, but it seems to work for me. Feedback is welcome. Just download and uncompress the DrupalUploader.app.zip file attached to this Drupal page, and then follow the instructions shown here. I've attached the source code as well as maybe someone can help me improve it.

 Another recommendation I have for OS X users is to run "optipng" on your PNG files before uploading them to Drupal or anywhere. It is available from fink (fink install optipng) and often compresses PNG file sizes in half. (I believe it is also available on other unix platforms).

Enjoy,
-Gene

___________________

Instructions:

  1. Place all the images you want to upload into a single folder on your Mac.
  2. While editing a Drupal web page, select the little yellow and grey mountain-and-sun icon (Insert/Edit Image), and get to the folder to which you want to upload the images.
  3. Select "Choose File" from the browser window, and select any file from the local directory of images which you want to upload (this step is necessary for the upload window to get oriented properly to the directory of files). Then select "Continue".
  4. DO NOT select "Upload"!
  5. Run the AppleScript program, either by double clicking on it, or from a terminal typing: open /wherever/you/put/DrupalUploader.app
  6. You will be prompted for the local directory of images. Find it and select "Continue".
  7. Wait. Watch if you like. Until it is done (you should NOT do anything else on your Mac until it finishes). It takes a few seconds per file. (I haven't tested it with large files yet to see if the script outpaces the upload, which could be a problem.)
  8. Use the images in Drupal as you like.