⭐ If you find Zipline useful, please consider giving it a star on Github! ⭐
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

  1. Head over to your Settings page (click your user icon in the top right corner)
  2. Scroll down to Generate Uploaders

  1. 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.sh

Using the script

File

./zipline-script-file.sh /path/to/file

URL

./zipline-script-url.sh https://example.com/file

DIY

This Bash script needs curl and jq. Replace the token and URL, then save it as zipline-upload.sh and make it executable:

zipline-upload.sh
#!/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 clipboard for X11
  • ./zipline-upload.sh "/path/to/file" | wl-copy for Wayland
  • ./zipline-upload.sh "/path/to/file" | pbcopy for 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.

On this page

Edit on GitHub

Last updated 10/26/2026