Upload To Dropbox With Keyboard Maestro
If you like yesterdays post with the file uploading to CloudApp you will love this one. It’s a Keyboard Maestro macro which lets you upload files to Dropbox.
As yesterdays macro it comes with a small feature set:
- It works with a selection of multiple files.
- It supports Finder and Path Finder.
- You can choose the folder you want to upload to. If you don’t it defaults to whatever directory you set as the default inside the macro.
- You can choose to output direct links… which comes in handy if you just uploading some pictures (therefore I set it as the default). The standard Dropbox links might be a good choice if you’re uploading other file types, e.g. a zip package.
- There’s also Droplet I build with the help of this script which executes our Keyboard Maestro script.
This macro currently doesn’t support folders (only files). If you’re interested in this leave some feedback and raise the chances of me trying to implement said feature.
Instructions
(1) Download and install Andrea Fabrizi’s Dropbox-Uploader from http://www.andreafabrizi.it/?dropbox_uploader
If you read Andrea’s installation instructions you know that using his bash script is secure, but… you also need to setup a Dropbox App so that you can use the script.
Go to App Console - Dropbox and create your app with the following settings:
Now head over to the bash file (you dutifully installed and made executable like Andrea told you to) and adjust the location of the config file. I just used the default settings:
#Default configuration file
CONFIG_FILE=~/.dropbox_uploader
I can’t remember right, but I think after the first run the script prompts you for your Dropbox developer information and stores everything away in the .dropbox_uploader
file. This is the time when you enter your freshly acquired app key and secret.
(2) Download and install my macro.
Import (or double-click) the Upload Files to Dropbox.kmmacros
macro. It will get placed in a group called “Finder/Path Finder” which is only available in said apps.
If you wish to use the Droplet, put the “Dropbox Uploader.app” where you like (how about the Applications directory?). You can add it to the Finder’s toolbar, use Dropzone or your favorite launcher to drag files onto it and upload them.
The Dropbox icon I used is from the Hand Stitch Social Iconset by DesignBolts.
After double clicking the helper macro (00)Helper for Droplet/ Upload Files to Dropbox.kmmacros
), it gets installed into the “Global Macro Group”. This is a workaround since the AppleScript (living inside the Dropbox Uploader app) can’t execute our initial Keyboard Maestro macro because it is in a group that restricts access to Finder and Path Finder.
Don’t forget to configurate the two variables (below the comment titled “SETUP” in the macro). In addition, you have to exchange another variable inside the shell script which uploads to Dropbox (I forgot to add a variable at the top) – replace bin=~/Dropbox/bin
with wherever your script is living.
That’s it… here comes a very tall screen shot with a lot of comments which marks the end of this post: