D
D
denis_druid2019-12-11 00:22:53
PHP
denis_druid, 2019-12-11 00:22:53

Why is the file not downloaded from Ya.Disk via SDK?

Hello!
Such situation. I work with the Yandex.Disk API via the SDK https://github.com/jack-theripper/yandex
Everything seems to be working. But when you try to download a file (jpg), a file is created in the specified folder, but that's it. That is, any file that I download is created at the specified path, but has a size of 84Kb (originals are 2-3 Mb each). Doesn't return any error. Apache logs are clean too. I work on a local server. Haven't tried hosting yet. And I do not understand where to dig. Either the functions work out incorrectly, or the SDK has some limitations, or something else. Tell me where to look, what to check?
$resource->download(__DIR__.'/файл.jpg');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
denis_druid, 2019-12-11
@denis_druid

$resource = $disk->getResource('/TG/', 10);
$res = $resource->items;
$res[1]->download('D:\\'.$res[1]['name'], true);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question