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

If you would like to create your own script, here are some constants that will most likely be needed.

TOKEN="your token"
URL="https://yourdomain.com/api/upload"
curl -H "authorization: $TOKEN" -H "content-type: multipart/form-data" $URL -F file=@$1 | jq -r .files[0].url | tr -d '\n'

After piping the output to jq (gets the URL) and tr (gets rid of the newline), you can pipe it to anything you want:

  • xclip -selection clipboard for X11
  • wl-copy for Wayland
  • pbcopy for macOS (this might be annoying since macOS is annoying)
  • etc.

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.


Last updated: 2/2/2025
Edit this page on GitHub