Upload directly to Vimeo via form - php

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:
Can I really do that, without pass to my clients the Vimeo PRO account data?
It's a secure method (considering that clients respect the agreement with Vimeo)?
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
User access my panel, with your credentials;
User access the video upload page;
Probably the server will contact Vimeo to get an uploader auth;
User will select your vimeo file and submit form;
System will receive the vimeo ID and everyone will be happy forever.
Thanks!

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.

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:

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 :)

Related

How to integrate video encryption & decryption from php for Android & Ios both?

I research about encryption/decryption mechanism & found many solutions like AES Encryption/Decryption. But, I want to secure my video just like videos secured in Hotstar, IMDB, Amazon Prime etc. For this I got a solution related to DRM mechanism. I understood its working process but, how it will be integrated from php side & connect it with mobile apps. Is there any other way to achieve security like apps that are mentioned above.
This is not an encryption question.
It's an authorization question.
I suggest using some login mechanism. like wordpress/drupal have.
The first user will share the video to his friend (his friend email address)
The friend gets an invitation email, to register an account and watch the video.
The friend, register with the account, and logs in.
in the page "Videos shared with me" he can see videos that the original sharer, shared with this particular e-mail address. (this information comes from some database)
Now for the streaming part,
make sure that the folder you hold the videos is not accessible from the internet. (some other folder, higher than public_html or use .htaccess on a private folder to restrict access directly.)
when viewing the page "Videos shared with me" generate a link to the video that goes to your PHP controller. something like www.mywebsite.com/watchvideo/620
when someone asks this video, you check if this person is logged in, and his account has access to this video again. if so, stream the video with the php buffer. learn more about: php output buffering and stream the video using readfile
If you find this answer helpful, consider to accept it.

D2L Valence - post feedback for a dropbox with no submission

I am currently implementing an app using the D2L Valence API. The goal is to upload 1 file per student (different for each student though) in some course. The file is now uploaded as a feedback for a combination of course-dropbox-student. Everything works perfectly as long as there is a submission from that student. If there isn't any - the call fails. I know this is possible to do via the UI (i.e. if I try to post a feedback through the UI for a user with no submission, it still works), but my question is would it be possible to do the same via API call. I tried simply attaching the file using this call (the file is uploaded before doing that) or posting a feedback and then attaching the file to it. Nothing works unless there is a submission. Thanks for any help.
I believe you're correct that the API doesn't currently support this behaviour (submitting feedback against a dropbox with no submission). If this behaviour does exist in the WebUI, then this would run contrary to D2L's stated goal that the API should be at feature/behaviour parity with the Web UI. I would therefore encourage you to report this as a defect via your organization's ASC or partner or account manager.

Instagram API hacked to allow uploads?

According to this press release: https://madmimi.com/p/7a2394?fe=1&pact=23816224659#,
this company can upload directly to Instagram.
I thought uploading to Instagram's API was not allowed? Does any one know how this is done?
Per Instagram's API documentation:
At this time, uploading via the API is not possible. We made a
conscious choice not to add this for the following reasons...
While it is possible to use Instagram's private API to upload photos (you'd need to capture this information using a proxy server) it is a very quick way to get you instantly banned for life from using the API.
There are a handful of exceptions to this rule, Hipstamatic/Oggl being one of them. Whether or not posts.so is or not, I can't say, though I find it highly unlikely that they're authorized to do that they're doing. More-so with gramblr, their site is.. shady at best.
You cannot post pictures to Instagram via the API.
See : How to post pictures to instagram using API

Display images stored in AWS S3 on website with php

I'm building a MYSQL database driven website on a AWS EC2 instance. Users can submit their data and we will automatically create a web page for them. The webpage will display their submitted data including a photo. Upon original submission of the user's data, we store the photo in S3 using AWSSDKforPHP. When their information is approved by an administrator a webpage is created via a php script.
I've tried the method of generating a signed url. This however requires a expiration time. Is there a way around this? It also includes your access and secret key in the request. Not sure if that is the most secure way to do things. I'd like the method to be as secure as possible so I don't want to make the bucket public. Unless there is a way to make the stored images available only for viewing.
What's the best method to use in a situation like this? Thanks for your help!!
Basically URLs to amazon S3 buckets are s3.amazonaws/bucket_name/key_name all you need to do is make sure the content on those buckets is publicly available and that mime type for those keys is indeed image (image/jpeg or image/png)
I used this web tool to manage my site. I opend my bucket just to its ip and now i can control the restriction from the tool, for the basic viewer I gave read access only

How to record user's voice from the website but without Flash?

How to record user's voice from the website without Flash? I want to use HTML5 but I found it will be hard to implement that. This site says this functionality is now only supported by the latest version of Chrome and Opera.
After searching the articles both here and the other site, I decide to find an alternative approach.
The scenario is: users will use different sort of platform (Android/iOS and other OS), but they access the same website and record their voice in their device and upload it later.
BTW: My purpose is that, as the users press the "Record" button on my web-page, the recording starts with his microphone. And as he presses the button again, the process stops. This can be on an iPad or a mobile phone so that he can't record his voice by some other software and store in his device then upload. They use their device to link my web-page to record voice. The webpage is not just for the users who operate on a PC.
Can I implement this function in client side via javascript? Or I should refer to Server side? What language and method should I adopt?
You can check google's web fundamental article on recording audio here : https://developers.google.com/web/fundamentals/media/recording-audio/
Its pretty easy to follow and it is device independent, obviously given correct browser support. You can get the audio recorded and saved on the local device or upload it to a server. Hope it helps.
oh, and on a note, its based on HTML5 and js. I don't know why you think implementing it using HTML5 is difficult but I hope this helps.
If it was up to me, I'd go for something like the link mentioned above and just use a fallback to Flash applet if its not supported in the users browser.
When it comes to the mobile platform, you'll have a big problem at least with the iPhone. I dont think you can upload files, and Iam pretty certain that you cannot record audio from their microphone. The best approach would be an application to do such a thing on mobile devices. Iam pretty sure that this can be done with PhoneGap - http://docs.phonegap.com/en/1.0.0/phonegap_media_capture_capture.md.html
If your not familiar with PhoneGap it allows you to write cross platform applications for mobile devices in HTML/CSS/JS and still get access to some core components. Like capturing audio.
Unfortunately no, you can't record from the browser, however, if you have an app (you can use Phonegap/Cordova (which use HTML5, JS and CSS to build your app for many platforms)) to record whatever you want to record, you can easily upload what you want to your server. It is currently impossible to use pure HTML5 in the mobile web browser to do this.
If you want to learn more about this, the API reference is a good start: http://docs.phonegap.com/en/2.1.0/cordova_media_capture_capture.md.html#capture.captureAudio

Categories