Skip to content
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

Unable to create resource #282

Open
kailasb opened this issue Mar 4, 2021 · 8 comments
Open

Unable to create resource #282

kailasb opened this issue Mar 4, 2021 · 8 comments

Comments

@kailasb
Copy link

kailasb commented Mar 4, 2021

@erunion
I'm facing the issue while upload the video. I'm using paid version of vimeo.
it's working fine locally but it create the URL with https://asia-files.tus.vimeo.com/files/vimeo-prod-src-tus-asia/3db9d46ef63cdfb01112798c352b05de

but when I upload the video from server it generating URL like https://europe-files.tus.vimeo.com/files/vimeo-prod-src-tus-eu/62566c38373b68318218e1f2b8239eb5 this and getting error "Unable to create resource"

can you help on this?

@erunion
Copy link
Contributor

erunion commented Mar 4, 2021

@kailasb I no longer work at Vimeo so you'll want to reach out to their support team. Sorry!

@kailasb
Copy link
Author

kailasb commented Mar 5, 2021

do you have any idea I've also upgrade the vimeo plugin to 3.0.6 & ankitpokhrel/tus-php: 1.2.1

@erunion
Copy link
Contributor

erunion commented Mar 6, 2021

Sorry I can't help you, I haven't worked on or with the product in almost two years. You should reach out to their support and they'll be able to help you out.

@charlietango
Copy link

@kailasb did you find any solution? I'm facing the same situation. It used to work just fine but a few weeks ago stopped working.

@HardikKhorasiya09
Copy link

@kailasb
I am facing the same issue in one of my laravel project.

Version's info:
"php" : ">=7.2.0",
"laravel/framework" : "^6.12",
"vimeo/vimeo-api" : "3.0.3"

Code:
$lib = new \Vimeo\Vimeo('vimeo_client_id', 'vimeo_client_secret');
$lib->setToken('vimeo_access_token');
$url = $lib->upload('file for upload', [
'name' => 'title',
'description' => 'texts,
'privacy' => [
'view' => 'anybody'
]
]);

All this working fine in my local environment. But It's no working on my production environment, I get this error "Unable to create resource".

Can any one help me in this..??

@GeoTimber
Copy link

see #266 (comment)

@lanjewarraj
Copy link

The below solution perfectly working fine in my case.

problem in code is ==> "the vimeo upload service perfectly working fine in localhost (local dev. environment) BUT when I try to upload code on production environment (Debian/Ubuntu server) it gives following errors:"

: [php5:warn] : PHP Warning: file_put_contents(/var/www/html/vendor/ankitpokhrel/tus-php/.cache/tus_php.client.cache): failed to open stream: Permission denied in /vendor/ankitpokhrel/tus-php/src/Cache/FileStore.php
: [php7:error] : PHP Fatal error: Uncaught Vimeo\Exceptions\VimeoUploadException: Unable to create resource. in vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:608\nStack trace:\n#0

So I found solution in this article:
[https://stackoverflow.com/questions/31099001/file-put-content-fail-to-open-streampermission-denied-in-laravel-5]

Then I change the permission on server folder by running the following command:
visit to your server folder(ssh login via terminal) of : /vendor/ankitpokhrel/ and run below command

==> chmod -R 0777 tus-php/

and issue is resolved 👍🏾

@pluc
Copy link

pluc commented Jun 3, 2022

Do not chmod to 0777 as it gives EVERYONE execution privilege in that folder. Use 0755 to give EVERYONE write access instead if you have to, but in truth you should be giving your web server write permission instead of everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants