Simple script that I use as part of Automator service for easy Dropbox file sharing in Mac OS X. It looks like that:
Just choose any file you want, click "Share with dropbox", and it automaticly copy file to your Dropbox Public folder (in my case ~/Dropbox/Public/FileShare/), get short link using Google API and paste it to clipboard.
- Create new service in Automator:
- Choose your Dropbox Public folder in the "Copy Finder Items" action. In my case it is ~/Dropbox/Public/FileShare/.
- Make sure to choose "as arguments" in "Pass input" in "Run Shell Script" action.
- Copy script code and remove "xxx" with your Dropbox UserID.
- Save service and try to use it!