I want to use Supabase as a filesystem so I can easily upload files to Supabase. I used this package (github.com/quix-labs/laravel-supabase-flysystem) to set it up and added the supabase
block to the disks
array in config/filesystems.php
. However, I can’t upload anything to Firebase – the method that actually uploads the file returns this error message: "Unable to write file at location: uploads/RQhhQkjeHerFo5f1OxUgU0LMa40Kulif52tUKzzM.png."
I’m not sure I’ve set everything up correctly. I have this config:
'supabase' => [
'driver' => 'supabase',
'key' => env('SUPABASE_SECRET_ACCESS_KEY'), // Use a privileged key; read-only does not work
'bucket' => env('SUPABASE_STORAGE_BUCKET'),
'endpoint' => env('SUPABASE_STORAGE_ENDPOINT'),
'url' => null, // <- Automatically generated; change here if you are using a proxy
'public' => true, // Default to true
'defaultUrlGeneration' => null, // 'signed' | 'public' <- default depends on public
'defaultUrlGenerationOptions' => [
'download' => false,
'transform' => [],
],
'signedUrlExpires' => 60 * 60 * 24, // 1 day <- default to 1 hour (3600)
],
I’m guessing the bucket
is simply the name of the bucket (e.g. myapp-file-uploads) and the endpoint is the one specified in the storage settings.
The key
is the bit I don’t understand. I don’t know what “Use a privileged key; read-only does not work” means. I’ve tried the S3 key in the storage settings and the Project API keys in the API settings.
Thanks for any help anyone can provide.