David Rodrigues
David Rodrigues

Reputation: 12532

Upload directly to Vimeo via form

I need to know a method to upload a video to a VIMEO PRO account using a form and PHP (to get auth). Currently I can send a video directly to Vimeo, using the panel, as was to be expected. But I have some clients that want to upload your videos directly from my their control panel (created by me), outside of vimeo, and I have only a unique PRO account, and I can't share the account data.

Seems that I can do it, based on the page API https://developer.vimeo.com/apis/advanced/upload#post (Uploading via POST).

My doubts are:

I need to upload DIRECTLY to Vimeo, without pass to my server, because I'll have two works: one to upload to server, other to upload from server to vimeo.

Off-topic: I believe I will not have problems with Vimeo, since they are customers of one company, and the account belongs to the company, and the videos will be her responsibility.

How should work

  1. User access my panel, with your credentials;
  2. User access the video upload page;
  3. Probably the server will contact Vimeo to get an uploader auth;
  4. User will select your vimeo file and submit form;
  5. System will receive the vimeo ID and everyone will be happy forever.

Thanks!

Upvotes: 4

Views: 5964

Answers (3)

Daniel Flippance
Daniel Flippance

Reputation: 7932

Answering in 2016: Assuming you have already retrieved an access token from Vimeo (OAuth2) this is a good piece of code to help you create an upload form:

https://github.com/websemantics/vimeo-upload

This gives you the code for the form with a place to drag-drop your video file and calls the upload API:

enter image description here

Upvotes: 1

Dave Kiss
Dave Kiss

Reputation: 10487

If you're using WordPress, there is a plugin available that allows you to do just that

http://vimeography.com/add-ons/vimeography-upload/

Source: I made it :)

Upvotes: 0

Dashron
Dashron

Reputation: 3998

Edit: This feature is now supported by Vimeo's (in beta) API3. You can request access at https://vimeo.com/help/contact

The below information is still accurate in regards to the Advanced API

This feature is not reliably supported by the advanced api.

The primary issue is that with client side uploads, there is no way to tell the upload server what to do once the upload is complete. Additionally, there is no client side technique to find out whether the upload has completed

You might be able to cheat and have the user upload through an iframe, and have the primary page perform a verify chunks call every couple of seconds. I have not tried this, at the moment it is just a theory. If you attempt this hack, Vimeo would love to know more via their contact page https://vimeo.com/help/contact

The feature you are discussing is on the roadmap for the next version of the API, and an early imperfect version was available at their API Hackday. It might be a better idea to hold off a bit and wait for the official feature.

NOTE: This observation does NOT apply to server side uploads. Because the whole upload process is handled via code on the server, it is extremely easy to tell when an upload is complete.

Upvotes: 2

Related Questions