We are using Firebase Google Cloud Storage Bucket to store our files.
When the logged in user wants the download the file kept inside certain folder Eg: 123/admin/1469611803143/123.xlsx
The url generated will be https://firebasestorage.googleapis.com/v0/b/MYWEBSITE.appspot.com/o/123%2Fadmin%2F1469611803143%2F123.xlsx?alt=media&token=whatever_alpa_numeric_token
As I download this file the file name will be 123%2Fadmin%2F1469611803143%2F123.xlsx
and not 123.xlsx
We have tried using download attribute to change the file name
but this did not change the file name to 123.xlsx
We understand that there are 2 ways around this.
1>Set Content-disposition header while uploading the file. But the contentDisposition variable needs to be set in certain way.
generally the header should have Content-Disposition: attachment; filename="<file name.ext>"
https://firebase.google.com/docs/storage/web/file-metadata
2> Generate a Signed URL with response-content-disposition
Can anyone help with this?
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/cff22d50-3fcc-4184-b008-e54d30b5d01c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.