Uplr — Quickly Upload & Share Files
Uploads Files via SSH to your own server and copies the resulting URL to clipboard for easy sharing.
Requirements
- Ruby
- Mac OS X 10.8+
- Web Server with SSH Private Key Authentication to store files
Setup
gem install uplr --pre
Help
uplr --help
NAME
uplr -- Upload Files via SCP
SYNOPSIS
uplr [options] file
DESCRIPTION
Uploads the specified file to the given server.
Progress is shown via system notifications (disable with --no-progress).
The final notification is clickable and opens the share URL in a web
browser. The share URL is automatically copied to the system clipboard
(disable with --no-clipboard).
OPTIONS
-f, --[no-]file File to upload (or pass as last argument)
-h, --host example.com Connection: host
-u, --user john Connection: user
-p /srv/www/example.com/public_html/u/,
--path Connection: path
-b http://www.example.com/u/, Upload URL directory
--base-url
-r, --[no-]progress Show upload progress notifications
-o, --[no-]progressbar Show upload progress bar when using command line
-c, --[no-]clipboard Copy final URL to clipboard
--help Show this message
-v, --version Print version
Example
uplr --host example.com \
--user john \
--path /srv/www/example.com/public_html/u/ \
--base-url http://www.example.com/u/ \
/path/to/file.png
Recommendation
To maximize joy, pair with Hazel.
- Create "Uploads" folder
- Drag "Uploads" folder into Dock
- Create new rule in Hazel for "Uploads" folder, choose "Run Shell Script", "embedded script", "/bin/bash" and paste/adjust the following:
uplr "$1"
Note that depending on your ruby setup it might be necessary to provide the full path to the binary, for example ~/.rbenv/shims/uplr
for rbenv.
Now you just have to drag&drop a file to the dock folder and seconds later there is a shareable link in your clipboard. Awesome!