-
Hi there, I was wondering if it is possible to pass For example, when using S3: uploaded_file.file_url(response_content_disposition: ContentDisposition.attachment('file.txt')) The above example works fine with S3. However, it does not work with Google Cloud Storage. I couldn't find anything documented about it, except to pass 'Content-Dispositon' as a header at the time of upload via url_options plugin, but I want to pass it at the time of download so the file that is downloaded gets a different name than the file that is actually stored on the Google Cloud Storage. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @majksner Sorry for the delay, I missed the notification for your question! As far as I know, header responses can not be modified at response-time on GCS. You need to proxy the response and add the header yourself. For Rails, the best way would probably be to use open a stream from your file on GCS and use |
Beta Was this translation helpful? Give feedback.
-
Hi, I was able to do this by passing {
query: {
'response-content-disposition':
ActionDispatch::Http::ContentDisposition.format(disposition: 'attachment', filename: 'file.txt')
}
} to |
Beta Was this translation helpful? Give feedback.
Hi,
I was able to do this by passing
to
file_url()
method