Created
December 17, 2017 21:44
-
-
Save uburuntu/5dbc18a123bfa63217ef442f5003d420 to your computer and use it in GitHub Desktop.
YaDisk uploading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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