- genevb's home page
- Posts
- 2024
- 2023
- 2022
- September (1)
- 2021
- 2020
- 2019
- 2018
- 2017
- December (1)
- October (3)
- September (1)
- August (1)
- July (2)
- June (2)
- April (2)
- March (2)
- February (1)
- 2016
- November (2)
- September (1)
- August (2)
- July (1)
- June (2)
- May (2)
- April (1)
- March (5)
- February (2)
- January (1)
- 2015
- December (1)
- October (1)
- September (2)
- June (1)
- May (2)
- April (2)
- March (3)
- February (1)
- January (3)
- 2014
- 2013
- 2012
- 2011
- January (3)
- 2010
- February (4)
- 2009
- 2008
- 2005
- October (1)
- My blog
- Post new blog entry
- All blogs
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:
- Place all the images you want to upload into a single folder on your Mac.
- 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.
- 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".
- DO NOT select "Upload"!
- Run the AppleScript program, either by double clicking on it, or from a terminal typing: open /wherever/you/put/DrupalUploader.app
- You will be prompted for the local directory of images. Find it and select "Continue".
- 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.)
- Use the images in Drupal as you like.
- genevb's blog
- Login or register to post comments