'I keep getting the error "Unable to create resource." for vimeo API, how can I fix this?
Errors: Warning: file_put_contents(): Only 0 of 207 bytes written, possibly out of free disk space in C:\xampp\htdocs\vimeotest\vendor\ankitpokhrel\tus-php\src\Cache\FileStore.php on line 191
Fatal error: Uncaught Vimeo\Exceptions\VimeoUploadException: Unable to create resource. in C:\xampp\htdocs\vimeotest\vendor\vimeo\vimeo-api\src\Vimeo\Vimeo.php:617 Stack trace: #0 C:\xampp\htdocs\vimeotest\vendor\vimeo\vimeo-api\src\Vimeo\Vimeo.php(345): Vimeo\Vimeo->perform_upload_tus('C:\Users\ellio\...', 2860896, Array) #1 C:\xampp\htdocs\vimeotest\index.php(22): Vimeo\Vimeo->upload('C:\Users\ellio\...', Array) #2 {main} thrown in C:\xampp\htdocs\vimeotest\vendor\vimeo\vimeo-api\src\Vimeo\Vimeo.php on line 617
Code:
session_start();
require 'vendor/autoload.php';
$client_id = 'myid';
$client_secret = 'my client secret';
$access_token = 'my access token';
use Vimeo\Vimeo;
$client = new Vimeo("$client_id", "$client_secret", "$access_token");
$response = $client->request('/tutorial', array(), 'GET');
echo '<pre>';
print_r($response);
$file_name = 'C:\Users\ellio\Documents\videotest.mp4';
$uri = $client->upload($file_name, array(
"name" => "Untitled",
"description" => "The description goes here."
));
echo "Your video URI is: " . $uri;
$response = $client->request($uri . '?fields=transcode.status');
if ($response['body']['transcode']['status'] === 'complete') {
print 'Your video finished transcoding.';
} elseif ($response['body']['transcode']['status'] === 'in_progress') {
print 'Your video is still transcoding.';
} else {
print 'Your video encountered an error during transcoding.';
}
?>
It uploads a video but it has 0% transcoding completed each time
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
