A
A
Artem Prokhorov2022-03-26 22:55:51
Yandex.Disk
Artem Prokhorov, 2022-03-26 22:55:51

How to upload photos to disk using curl?

So I get a link to further download the file.

curl -XGET -H 'Authorization: OAuth mytoken' -H "Content-type: application/json" 'https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk:/Приложения/application/test.png'
.
And this, obviously not finished, is a link for downloading a photo from the server to disk.
curl -XPUT -H "Content-type: application/json"  'https://uploader5g.disk.yandex.net:443/upload-target/hereuniquenumbersandotherstuff'

How can I complete my link?
After all, you need to specify as what file and from which directory I send it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question