Uploading Images to Drupal from the iPad

Printer-friendly versionSend to friendPDF version
Image uploaded by Dan Eveland on 07/18/2011 - 10:59

Since I now replaced the use of a conventional computer with an iPad for my development and content creation, I needed an easy and quick way to post images from my iPad to my blog on Drupal 6. I use PhotoForge2 as my image editing app on my iPad (very nice app, and I even bought the extra filter package). It works great, but getting the images to Drupal was a major pain involving emailing myself files, which is a sure sign of a not-so-good process. Therefore, a more efficient solution was desperately needed to get image content directly from the iPad to Drupal.

Note: As this article was being written and I was doing research (Googling), I noticed a very similar article had already been written. Please also check out this article by Jeff Geerling. His site is full of great Drupal goodness. He gave me permission to swipe some of this for my article, which was very nice of him.

Originally I tried to find some way for Drupal to get images from my iPad. I searched for WYSIWYG editors I could install in Drupal that had file management components, and discovered none of them work on the iPad. Then I tried to find a specific module that might contain some magical javascript to allow me to upload images from an iOS device. No dice.

So, eventually I considered a web-to-web transfer -- some way I would get Drupal to download a file that was posted where Drupal would get to it. A search on drupal.org came up with FileField Sources. This allows you to use a URL to designate content for a CCK file field, and then have Drupal download and store that file as if it were a regular upload.

You will need to download, install and activate CCK, FileFIeld and the FileField Sources modules for this to work. Once you create your CCK field to use to store the images, assign the Remote URL as one of the sources when you are creating the field.

The next step was how to get images into a location publicly available over the web without a massive hassle. After just a moment of consideration, the Dropbox Public folder came to mind.

Problem: unfortunately for me, I had deleted my Public folder in a fit of paranoia. Solution: fortunately for me, if you create a folder in your Dropbox root and name it "Public" it automatically takes on the characteristics of the original Public folder.

Here's how I post images to my Drupal site from my iPad:

  1. Put the image you want in your Dropbox Public folder. I used the Dropbox integration from PhotoForge2 to put it there directly after cropping and editing in the PhotoForge2 app. You can also use the Dropbox app to upoad images to the Public folder.
  2. Open up Dropbox on your iPad, and navigate to the "Public" folder.
  3. Tap the photo you just uploaded, then tap the link icon, and select "Copy Link to Clipboard."
  4. Now switch over to Safari, visit your Drupal site's content type with the FileField Sources set up already (you just have to set that up this once per field per content type, not every time you create content).
  5. Tap on "Remote URL," and tap in the URL field. Tap once again to paste the URL you copied from Dropbox, then click "Transfer" to put the file on your Drupal site.

You can then click the "Transfer" button and get the file transfered from Dropbox to your Drupal site. A copy is made on your Drupal site, so feel free to clean out your Dropbox public folder occasionally.

So until there is a smoother way of doing this, this is the least pain-in-the-ass way to get images from an iOS device onto Drupal 6.

Comments

Dan Eveland's picture

New process

I have just discovered that Drupad recognizes CCK file fields and you can upload right from your iPhone. Since I take all my pics there, or can get them there through the photo stream, it's a perfect solution. I'll be doing an article on Drupad very soon.

alevill's picture

Use iCab Mobile Browser

Did you know iCab Mobile browser has the ability to upload pictures and files to the Internet? I personally haven't used Drupal, but I do use Wordpress and I'm able to upload pictures in the admin panel directly from the photos app. You can upload files too as long as they are located in iCab's download manager folder, and also open these files from other apps using the "Open in..." function of iOS. I too have given up the computer for the iPad full time and I'm loving it. However uploading content to the Internet easily was hard to figure out until I found this function in iCab by mistake as it's not clearly advertised in the description. Check it out. Of all the third party browsers in the App Store, this is the one which resembles a desktop browser the most, and the most powerful.

Dan Eveland's picture

Trying this

Ok, this sounds great. Trying this right now.

Dan Eveland's picture

Good news and bad news

The good news is that it worked just like you said! The bad news is that it crashed soon after. The features this browser has is just amazing! I will keep using it.

alevill's picture

There Might be a Fix...

Yeah it does crashes sometimes, but if you go to iOS Settings and look for iCab Mobile you'll see at the bottom under "Low Memory Conditions" it gives you the option to release the tabs from hugging memory which could potentially crash the browser. I prefer to have it show low memory warnings so I know when I'm pushing it, and to to release tabs during "Critical Conditions Only". This will release a background tab without closing it when it needs to. When you go back it just reloads the tab again. Hope this helps.

By the way, awesome blog! I love the iPad tips. Keep 'em coming.

RobRitchie's picture

Very Interesting

This is very much like reading a walk-through to an adventure game. Get the thing and stand by the other thing and tap and click until the thing opens.

Watching you solve these logic puzzles is very interesting.

P.S. Algernon is looking a little sick.

Pure, unadulterated awesome.

j1msh4w's picture

Cool!

You are living in the future with your tricorder!