Skip to content

Passing response_content_disposition to _url method #51

Answered by majksner
majksner asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

I was able to do this by passing

{
    query: {
    'response-content-disposition':
      ActionDispatch::Http::ContentDisposition.format(disposition: 'attachment', filename: 'file.txt')
    }
}

to file_url() method

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@renchap
Comment options

Answer selected by renchap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants