GuidesUploaders
Shell Script
Uploading a file using a shell script
This guide will show you how to generate a shell-script that takes an argument (file/url) and uploads it to Zipline.
Downloading
- Head over to your Settings page (click your user icon in the top right corner)
- Scroll down to Generate Uploaders

- Click on Shell Script, then enable any options that you would like

Once you download one save it to your computer, remember the path, and make the file executable.
chmod +x ~/Downloads/zipline-script-file.sh
#or
chmod +x ~/Downloads/zipline-script-url.shUsing the script
File
./zipline-script-file.sh /path/to/fileURL
./zipline-script-url.sh https://example.com/fileDIY
This Bash script needs curl and jq. Replace the token and URL, then save it as zipline-upload.sh and make it executable:
#!/usr/bin/env bash
set -euo pipefail
TOKEN="YOUR_API_TOKEN"
URL="https://zipline.example.com/api/upload"
file=${1:?Usage: zipline-upload.sh /path/to/file}
response=$(curl --fail-with-body --silent --show-error \
-H "Authorization: $TOKEN" \
-F "file=@$file" \
"$URL")
url=$(jq -er '.files[0].url | strings | select(length > 0)' <<< "$response")
printf '%s' "$url"Make the script executable and pass a file path:
chmod +x ./zipline-upload.sh
./zipline-upload.sh "/path/to/my screenshot.png"To copy the URL, pipe the output to your clipboard tool:
./zipline-upload.sh "/path/to/file" | xclip -selection clipboardfor X11./zipline-upload.sh "/path/to/file" | wl-copyfor Wayland./zipline-upload.sh "/path/to/file" | pbcopyfor macOS
More Information
- Wayland Guide: An extensive guide on the many different ways to take screenshots and upload them to Zipline when using a Wayland compositor.