P
P
paulvales2015-06-03 15:54:31
PHP
paulvales, 2015-06-03 15:54:31

How to log in and upload a file to YandexDisk?

Hello, I work at the training ground, everything seems to work out. And how to implement all this in PHP, I need to upload to YADISK and download from it, I can’t even do authorization for an hour already.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
paulvales, 2015-06-04
@paulvales

This helped: htmlweb.ru/php/example/upload_yandex_disk.php really a problem with large files

G
gsa_rus, 2015-07-01
@gsa_rus

I don't know how in PHP , but in Powershell I do this:

$headers = New-Object "System.Collections.Generic.Dictionary"
$headers.Add("Authorization" ,'OAuth ТуТваШтоКеНнИд')
$headers.Add("Content-Type","application/json")
$Log = Invoke-WebRequest -method POST -URI ("https://cloud-api.yandex.net:443/v1/disk/resources/upload?path=setup.zip&url=http%3A%2F%2Fshoma.info%2FMDpv5") -Headers $headers

Uploads the setup.zip file from http:\\Fshoma.info\FMDpv5 to the root of Yandex Disk (direct link to the file in URL format!!!)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question