SupabaseS
Supabase3y ago
Rick

not able to download from privat bucket

so i have a privat bucket tickets. i have set my policies for storage.objects and storage.buckets and the bucket itself "tickets"

i can upload and delete no problem.

but when i download using this function ,nothing happens :

const { data, error } = await supabase
.storage
.from('tickets')
.download(path)

console.log (data)

i get this in my console for the data :

Blob {size: 67712, type: 'application/pdf'}


and also this for the "api call" from the developer tools ,which says status OK
Anfrage-URL:
https://wydzufiwwmtmoeariusj.supabase.co/storage/v1/object/tickets/c26cdf3c-835c-486d-ad79-0c38293ccfc8/21385167-e8e9-4b8b-8c08-7e77ddccc44d/1702026035773_1701987100359_1701967014495_weweweew.pdf
Anfragemethode:
GET
Statuscode:
200 OK (von Datenträgercache)
Remote-Adresse:
104.18.38.107:443
Richtlinien Für Referrer-URL:
strict-origin-when-cross-origin

now when i visist the url i get this message in the browser :

{"statusCode":"400","error":"Error","message":"headers must have required property 'authorization'"}

i have tried everything possible for hours... i down know how to get it to work..
can someone help ?
Was this page helpful?