Upload directly to Vimeo via the form

I need to know how to upload videos to a VIMEO PRO account using a form and PHP (for authorization). Currently, I can send videos directly to Vimeo using the panel, as expected. But I have some clients who want to download your videos directly from my control panel (created by me), outside of vimeo, and I only have a unique PRO account, and I can not share the account data.

It seems that I can do this based on the API page https://developer.vimeo.com/apis/advanced/upload#post (Download via POST).

My doubts :

  • Can I do this without sharing my Vimeo PRO account information with my clients?
  • Is this a safe method (given that customers respect the agreement with Vimeo)?

I need to upload DIRECTLY to Vimeo without going to my server, because I will have two jobs: one to upload to the server, the other to upload from the server to vimeo.

Off-topic: I believe that I will not have problems with Vimeo, as they are customers of the same company, and the account belongs to the company, and the video will be its responsibility.

How to work

  • A user gets access to my panel with your credentials;
  • The user gets access to the video download page;
  • Perhaps the server will contact Vimeo to get uploader authorization;
  • The user will select your vimeo file and submit the form;
  • The system will receive a Vimeo identifier and everyone will be happy forever.

Thanks!

+4
source share
3 answers

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

The information below is still relevant for the advanced API.

This feature is not reliably supported by the extended api.

The main problem is that when downloading on the client side there is no way to tell the download server what to do after the download is complete. In addition, there is no technology on the client side to find out if the download is complete.

You might be able to spoof and load the user through an iframe, and the primary page checks for pieces of packets every couple of seconds. I have not tried this, at the moment it is just a theory. If you try to perform this hack, Vimeo would like to know more through its 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 in their Hackday API. Perhaps it would be better to stop a bit and wait for the official function.

NOTE. This observation does NOT apply to server-side downloads. Since the entire download process is processed using code on the server, it is very easy to tell when the download is complete.

+2
source

The answer is in 2016. Assuming you already received an access token from Vimeo (OAuth2), this is a good piece of code that will help you create a upload form:

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

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

enter image description here

+1
source

If you use WordPress, there is an available plugin that allows you to do just that.

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

Source: I did it :)

0
source

Source: https://habr.com/ru/post/1480575/


All Articles