Creating a Share on Ovi Droplet

From rukapedia
Jump to: navigation, search

<embed src="" width="512" height="420" type="application/x-shockwave-flash"></embed>

The PHP class class.ovi.php provides the facility to programatically upload JPEG images to the Share on Ovi web service.

I've created UploadToOvi.php as a wrapper around this class to make command line uploading easier, and using Platypus it's possible to take things one step further and create a Mac OS X "droplet" that allows drag-and-drop uploading to Share on Ovi.

With this droplet you can easily drag JPEGs from the Finder, from iPhoto, or from any other application that supports directly into Share on Ovi.

This document outlines how to set up this droplet.

Install Requirements

  1. Download class.ovi.php and install where PHP can find it (i.e. in a location defined in your local php.ini file's setting for include_path).
  2. Download PHP Atom API, unpack and install the class.wsse.php file where PHP can find it.
  3. Download UploadToOvi.php and edit with your Share on Ovi username and password.
  4. (Optional) Install Growl and then install growlnotify.
  5. (Optional) Download the Share on Ovi logo.
  6. Download and install Platypus.

Testing the UploadToOvi.php Script

Before you create a droplet, it's best to first test the UploadToOvi.php script to make sure it's working properly, as it's easier to debug things at this stage first.

Open up Terminal, and test as follows:

php UploadToOvi.php /path/to/image/file

For example, if you have a JPEG image at /Users/peter/images/fred.jpg, you can test like this:

php UploadToOvi.php /Users/peter/images/fred.jpg

The result should be a silent upload of the image to Share on Ovi (just check Share on Ovi to see if it ended up there) and, if you configured growlnotify, an alert of the successful upload.

Setting up Droplet in Platypus

Launch Platypus and create a new application with the following settings:

  • App Name - "UploadToOvi"
  • Script Type - Select "PHP".
  • Script Path - Click "Select" and then locate the local copy of UploadToOvi.php you installed.
  • Output - select "Progress Bar" (you can select "Text Window" if you need to debug something).
  • Check the Is droppable box under "Advanced Options".
  • (Optional) Drag the Share on Ovi logo file you downloaded into the icon area.
  • Click "Create" and save the new application on your Desktop.



If you've configured everything properly, you should now be able to drag-and-drop JPEG images from the Finder, and from iPhoto onto the droplet you created and they should then automatically get uploaded to your Share on Ovi "public" channel.