sausin / laravel-ovh

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

Storage::temporaryUrl() getting wrong temp_url_sig size #94

Closed stef740 closed 6 months ago

stef740 commented 6 months ago

Hello,

I've got an issue when attempting an temporaryUrl: it seems that the temp_url_sig returned is 40 chars long instead of 64 as expected. When i do it manually via $swift tempurl GET 3600, with proper key etc... the returned temp_url_sig is 64 chars. When using Storage::temporaryUrl() the returned temp_url_sig is 40 chars. temp_url_expires is ok Laravel 8

temp_url_sig=4b8a3d7c23c4a42f26f377739e9ef8e161a4709f&temp_url_expires=1713369629

-> 401 Unauthorized: Temp URL invalid

Temp URl Key was set with

php artisan ovh:set-temp-url-key

and is identical in openstack container

I can send object to storage using \Storage::disk('ovh')->put($filename.'.xlsx',file_get_contents($path));

Storage is infomaniak public cloud (openstack)

my config:

'ovh' => [
    'driver' => 'ovh',
    'authUrl' => 'https://api.pub1.infomaniak.cloud/identity/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_CONTAINER_NAME'),
    'tempUrlKey' => env('OS_TEMP_URL_KEY'),

    // Since v2.1
    // Optional variable and only if you have setup a custom endpoint.
    'endpoint' => env('OS_CUSTOM_ENDPOINT'),

    // Optional variables for handling large objects.
    // Defaults below are 300MB threshold & 100MB segments.
    'swiftLargeObjectThreshold' => env('OS_LARGE_OBJECT_THRESHOLD', 300 * 1024 * 1024),
    'swiftSegmentSize' => env('OS_SEGMENT_SIZE', 100 * 1024 * 1024),
    'swiftSegmentContainer' => env('OS_SEGMENT_CONTAINER', null),
    'deleteAfter' => env('OS_DEFAULT_DELETE_AFTER', null),
    'cache' => false,
    'prefix' => null,
],      

Many thanks for your help

sausin commented 6 months ago

Hello @stef740

The package is supported and built only for OVH. No plans to support other providers at this time!