sausin / laravel-ovh

Wrapper for OVH Object Storage integration with laravel
MIT License
37 stars 12 forks source link

Error to upload file #92

Closed jarabito11 closed 10 months ago

jarabito11 commented 1 year ago

Hi, I am trying to upload a file. The thing is, I keep getting the error:

he remote server returned a \"401 UNAUTHORIZED\" error for the following transaction:\n\nRequest\n~~~\nPOST /v3/auth/tokens

I have tried a thousand users and passwords, I don't know what else to try, I have downloaded the RC file, I have entered the data, I have assigned my Object Storage user to my S3 container, but nothing, it still doesn't work.

My filesystems.php: 'ovh' => [ 'driver' => 'ovh', 'authUrl' => env('OS_AUTH_URL', 'https://auth.cloud.ovh.net/v3/'), 'projectId' => env('OS_PROJECT_ID'), 'region' => env('OS_REGION_NAME'), 'userDomain' => env('OS_USER_DOMAIN_NAME', 'Default'), 'username' => env('OS_USERNAME'), 'password' => env('OS_PASSWORD'), 'containerName' => env('OS_PROJECT_DOMAIN_NAME') ],

My controller:

\Storage::disk('ovh')->put(Video::$PATH_VIDEOS . "/$videoName", file_get_contents($video)); $videoPath = \Storage::disk('ovh')->url(Video::$PATH_VIDEOS . "/$videoName");

Can someone please help me? Thank you very much in advance.

@sausin please!

sausin commented 10 months ago

Package is working. Assuming you got the correct credentials figured out. Please re-open in case of any issues