-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vimeo::uploadImage() method doesn't seem to work #25
Comments
Have you been able to make other requests, such as A status of 0 usually means the request never reached our server, which usually means there is an issue with certificates. Take a look at http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/ for more information, I do not recommend the easy fix (it's insecure). If that doesn't solve the problem, try adding some curl debugging with http://php.net/manual/en/function.curl-error.php |
Hi, Have you made any progress with this issue? Thanks! |
Hi, I tried I then discovered that I was setting $pictures_uri in uploadImage() wrong - I had set it to With the latter set, I got the "Unable to request an upload url from vimeo" exception, and this response:
This is interesting since in the code it's a POST request. Am I using the wrong endpoint? I also tried Matt |
The $pictures_uri should match the pictures connection in a clip response. It usually looks like "/videos/105769240/pictures".
A POST request will be made against that url (https://github.com/vimeo/vimeo.php/blob/master/vimeo.php#L354) and it should give you a new single picture response, with the necessary informatoin to perform the upload. Everything will be handled for you in the uploadImage method, and it will return a uri, pointing to the new image resource (/videos/[id]/pictures/[id]) |
I have been trying to use the uploadImage() method to add a thumbnail to a video that has been uploaded, but not yet finished processing. I'm passing in these parameters:
uploadImage("https://api.vimeo.com/videos/{$videoID}", $filename);
When I do this, I get a VimeoUploadException with message 'Unable to request an upload url from vimeo'.
I looked a bit further by debuglogging the $pictures_response variable (which is set on line 356 of Vimeo.php) and got this:
Is this a bug, or am I doing something wrong?
Also is uploadImage intended to be used to upload video thumbnails? Is this expected to work for videos that have not yet finished processing?
Thanks!
Matt
The text was updated successfully, but these errors were encountered: