Skip to content

Instantly share code, notes, and snippets.

@mega-arbuz
mega-arbuz / upload_dropbox.sh
Created January 24, 2019 22:30
Upload to dropbox and get shareable link
#!/bin/bash
if [ $# -lt 3 ]; then echo "Missing parameters"; exit 1; fi
curl -X POST https://content.dropboxapi.com/2/files/upload \
--header "Authorization: Bearer $1" \
--header "Dropbox-API-Arg: {\"path\": \"/builds/$2\",\"mode\": \"add\",\"autorename\": true,\"mute\": false,\"strict_conflict\": false}" \
--header "Content-Type: application/octet-stream" \
--data-binary @$3 > /dev/null