Reputation: 1141
I've been trying to replace source file by these docs - Vimeo API Replace source file.
I'm using Automatic (“pull”) uploads for upload and it works just fine. According to the docs, to replace a file, I should make PUT
request to /videos/{id}/files
and then proceed with POST
to /me/videos
, but every time PUT
request fails and I get the same:
PHP Fatal error: Uncaught exception 'Vimeo\Exceptions\VimeoRequestException' with message
'Unable to complete request.[Operation timed out after 30000 milliseconds with 0 bytes received]'
in /home/<...>/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:154
POST
and PUT
request are fed with the same parameters. Maybe I should pass different type for PUT
(POST
gets 'type' => 'pull'
)?
Using Vimeo API PHP Lib v. 1.2
What am I missing?
Upvotes: 0
Views: 1210
Reputation: 3998
Definitely a bug in the API, it shouldn't timeout. We're on it. For direct support reach out to us at [email protected].
One thing that can help in the short term is to increase your PHP timeout using the curl option CURLOPT_TIMEOUT
(this can be set on the php lib using $lib->setCURLOptions([CURLOPT_TIMEOUT => 60])
for 60 seconds).
Once this bug is fixed, it might not resolve the issue. There's a good chance that Vimeo's request to get metadata about the the pull url is timing out, which could be a slow link, or a problem with the upload servers. In either case I recommend reaching out directly for support.
For anyone in the future, if you see timeouts, feel free to reach out to [email protected] for more direct assistance.
Upvotes: 1