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
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 clipboardfor X11wl-copyfor Waylandpbcopyfor 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 on