Feature request
It would be nice to have the option to set Content-Disposition: attachment header for storage object to allow download of images in the browser, instead of the browser displaying them inline.
Is your feature request related to a problem? Please describe.
The HTML a download attribute, like
<a href="https://[project_ref].supabase.co/storage/v1/object/public/[id]" download>Image Download</a>, only works for same-origin. See https://stackoverflow.com/a/49736875/23028
Describe the solution you'd like
Adding parameter like Image Transformations
https://project_id.supabase.co/storage/v1/render/image/public/bucket/image.jpg?download=true
Or add to option to the uploading/updating API, like the existing Content-Type FileOptions.
const { data, error } = await supabase.storage
.from('avatars')
.upload('public/avatar1.png', avatarFile, {
contentDisposition: 'attachment'
})
Describe alternatives you've considered
A roundabout workaround would be to create your own API end point that sets the Content-Disposition: attachment header and stream the data from the storage.
Feature request
It would be nice to have the option to set
Content-Disposition: attachmentheader for storage object to allow download of images in the browser, instead of the browser displaying them inline.Is your feature request related to a problem? Please describe.
The HTML a download attribute, like
<a href="https://[project_ref].supabase.co/storage/v1/object/public/[id]" download>Image Download</a>, only works for same-origin. See https://stackoverflow.com/a/49736875/23028Describe the solution you'd like
Adding parameter like Image Transformations
https://project_id.supabase.co/storage/v1/render/image/public/bucket/image.jpg?download=trueOr add to option to the uploading/updating API, like the existing Content-Type FileOptions.
Describe alternatives you've considered
A roundabout workaround would be to create your own API end point that sets the
Content-Disposition: attachmentheader and stream the data from the storage.