If you're like me, you'll most probably have a temp directory on your webserver where you can put stuff which shouldn't last long on the internets. Mine gets deleted automatically after 14 days via cron. The automatic deletion was convenient enough, but with the new services menu in Snow Leopard it gets even better. You can super easily whip up your own service to upload selected files from the Finder with one click to your server.

See the detailed steps after the jump ...

Let's step through this:

1. Open Automator, select "Service"

Automator sheet

2. Setup service to accept "files and folders" in Finder

Automator Service settings

3. Drag "Run shell script" action into your workflow and configure it to "Pass input as arguments".

Automator with empty shell script

4. Insert script

I'm assuming that you have a webserver with ssh running and setup access via ssh keys. Otherwise you get the idea and may modify the script to use ftp / add a password / setup your ssh keys or whatever.

  1. USERNAME="your_username"
  2. HOST="yourdomain.com"
  3. REMOTEPATH="your/path/to/tmp/folder"
  4. BASEURL="http://yourdomain.com/tmp"
  5.  
  6. for f in "$@"
  7. do
  8.     scp "$f" $USERNAME@$HOST:$REMOTEPATH
  9.     filename=`basename "$f" | sed -e 's/\:/%3a/g;s/\//%2f/g;s/\?/%3f/g;s/\&/%3d/g;s/\,/%2c/g;s/\[/%5b/g;s/\]/%5d/g;s/ /%20/g;s/"/%22/g'`
  10.     url="$BASEURL/${filename}"
  11.     if [ -z "$urls" ]; then
  12.         urls="$url"
  13.     else
  14.         urls="${urls}\n${url}"
  15.     fi
  16. done
  17. echo -en "$urls" | pbcopy

The script uploads the selected files to the temp dir and additionally copies the URLs to your clipboard.

5. Save service

Finally save your Service (cmd-s) to eg. "Upload to tmp folder", which will give you this menu in finder:
Finder service contextmenu

and you'll get an indicator that the script is actually doing something with the option to interrupt it in the system menubar while it is running (a spinning cogwheel):

System statusbar running service

That's it. Happy uploading!