- Step 1, create Service in Automator:
- Step 2, set Service for files:
- Step 3: insert bash script (see below)
- Step 4, save:
- Step 5, test:
for f in "$@" | |
do | |
scp $f username@server:files/$(basename $f) | |
echo "https://files.my-url/$(basename $f)" | pbcopy | |
done |