Skip to content

Instantly share code, notes, and snippets.

@uburuntu
Created December 17, 2017 21:44
Show Gist options
  • Save uburuntu/5dbc18a123bfa63217ef442f5003d420 to your computer and use it in GitHub Desktop.
Save uburuntu/5dbc18a123bfa63217ef442f5003d420 to your computer and use it in GitHub Desktop.
YaDisk uploading
#!/bin/bash
yadisk_dir="app:/results"
content=$(curl -X GET -H "Content-Type: application/json" -H "Authorization: OAuth $YADISK_API_TOKEN" https://cloud-api.yandex.net/v1/disk/resources/upload?path=$yadisk_dir/$1&overwrite=true)
curl --upload-file $1 $(jq -r '.href' <<< "$content")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment