SmokerCreep
SmokerCreep

Reputation: 1

Vimeo App direct upload from client device using PHP

after reading a lot of pages I couldn't find out if it is possible to upload a video with the PHP SDK directly to an Vimeo account? I found a lot of examples using a post option from a server uri or a pull option from an url.

$file_name = "{path_to_a_video_on_the_file_system}";
$uri = $myvimeo->upload($file_name, array(

But I would need to directly upload from a website form (users device) to vimeo. Is this possible and may you have a link to a code example?

Thanks a lot

Upvotes: 0

Views: 243

Answers (1)

aaronm67
aaronm67

Reputation: 289

The form based approach described here is the easiest approach for this.

You can make this request from the PHP library using request, i.e.

$response = $lib->request('/me/videos', [
  "upload" => [
    "approach" => "post",
    "redirect_url" => "{url}"
  ]
], 'POST');

This will return an HTML form in $response['body']['upload']['form'].

Upvotes: 1

Related Questions