In my case my public webserver is another machine on my LAN, but it could be a remote server too
- Hazel scp's the file to your web server, into the specified directory
It then moves the local file into a subdirectory called History (you can remove this rule and just have Hazel delete the file if you prefer)
Finally it copies the PUBLIC url of the file into your clipboard, ready to be pasted into IM or IRC etc

SCRIPT 1
Shell: /bin/sh
- Code: Select all
base=$(basename "$1")
fname=$(echo "${base}" | sed 's/ /_/g')
/usr/bin/scp "$1" your_login@your_server:"/www/nelson/hazel/$fname"
SCRIPT 2
- Code: Select all
set text item delimiters to ":"
set file_name to last text item of (theFile as text)
tell application "Finder" to set the clipboard to the "http://your_server_address.homeip.net/hazel/" & file_name as text
Changes you need to make
in SCRIPT 1 - change "your_login@your_server:"/www/nelson/hazel/" to the login, hostname and destination directory of your server
in SCRIPT 2 - change http://your_server_address.homeip.net/hazel/ to point to the PUBLIC uri of your server
Finally, this is intended for sharing ad-hoc files (screenshots, data dumps, text files etc).
Its not meant as a way of publishing changes to your website pages