A
A
Artur Yalaltdinov2016-05-01 01:32:25
PHP
Artur Yalaltdinov, 2016-05-01 01:32:25

Direct upload video to Rutube?

Hello everyone, I decided to upload videos to Rutube video hosting using their API and there is 1 question, is it possible to organize video uploads not by url, but directly? because there can be a lot of video downloads. So I ran into a problem that it will be necessary to expand, the fact is that at the moment, in order to upload a video, I first upload it to my hosting and after that, as the video has been uploaded, I send a request to the API, which is already uploading from our hosting to my Rutube.
The whole point is how can you do without uploading a video to your hosting and immediately send it to Rutube?
That is not so.

$data = $video->upload("http://example.com/video.mp4", $title, $descr, $isHidden, $categoryId, $callback_url, $errback_url);

But like this? or something like that.
$data = $video->upload($_FILES['file'], $title, $descr, $isHidden, $categoryId, $callback_url, $errback_url);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2016-05-01
@ThunderCat

There is a suspicion that the server api does not support downloading by post, but stupidly downloads the video from the specified url (file_get or curl using the get method), so it needs to specify the download address available for opening on the web. As an option, organize a server on your ip with Internet access and upload your videos there, and transfer them via IP, and not through a domain. It is possible that FTP will fail.
like this:

$data = $video->upload("http://10.20.30.40/video.mp4", 
                                       $title, 
                                       $descr,
                                       $isHidden,
                                       $categoryId, 
                                       $callback_url, 
                                       $errback_url);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question