Skip to content

Instantly share code, notes, and snippets.

@xarem
Last active May 4, 2020 04:11
Show Gist options
  • Save xarem/9f2751f5da40b59a31bf to your computer and use it in GitHub Desktop.
Save xarem/9f2751f5da40b59a31bf to your computer and use it in GitHub Desktop.
Upload files from context menu in OS X
  • Step 1, create Service in Automator:

Step 1

  • Step 2, set Service for files:

Step 2

  • Step 3: insert bash script (see below)
  • Step 4, save:

Step 4

  • Step 5, test:

Step 5

for f in "$@"
do
scp $f username@server:files/$(basename $f)
echo "https://files.my-url/$(basename $f)" | pbcopy
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment