Icelab

Build your own file dropper

By Max Wheeler14 Mar 2013

One the ways we collaborate from our physically transient offices is to share screenshots of the designs and apps that we’re working on through Campfire, or other one-on-one messaging apps. I’ve tried various file dropping apps over the years, and had settled on Cloud.

Cloud is elegant and easy to use. They have a neat little menubar application that lets you drag-and-drop files onto its icon to upload. It is also unbearably slow. Anyone who’s clicked on a cl.ly link understands the pain of waiting … and waiting for a shared image to download.

My needs are pretty basic. I wanted an easy way to send the files to somewhere, and have the URL of the uploaded file added to my clipboard. Tim’s method of downscaling retina screenshots using Automator sparked the idea of using a simple script to handle the two needs above. And so, I present a barebones file dropper using Automator:

Automator application for simple file dropping

It’s pretty straightforward. The “Set variable” action at the start is there to pass the dropped file path through to a simple shell script that does the actual uploading (I happen to be using zsh, but the same would work fine in bash too). All the shell script does is upload the file using scp to a server and path of your choice, with a little timestamped safety check in there to make sure we don’t override a previous drop, as well as a simple filename sanitisation. Once it’s done it passes the URL of the uploaded file to the clipboard for easy pasting.

Once you’ve customised the script to match your credentials, save it to /Applications and you’re away. Dragging an image onto the app’s icon will start the upload. Or if you use LaunchBar, InstantSend makes it even easier.

Obviously this is all super simple. There is no history, no statistics, and no easy way to delete a file. The barrier to entry for this is a certainly higher than Cloud given you need a web server that you have ssh access to. However it does mean that your drops end up on a place that you control where the only space limits are your own, and that they will be delivered as fast as your server of choice can do it.

Work with us, we’re good peopleGet in touch