We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
To Reproduce Steps to reproduce the behavior:
has_attached_file :asset, s3_headers: lambda { |attachment| puts "*********** attachment = #{attachment.to_json}" { 'Cache-Control' => "max-age=#{1.year.to_i}", 'Expires' => 1.year.from_now.httpdate, 'Content-Disposition': "Attachment; file=#{attachment.asset_file_name}" } }
Expected behavior When uploading a PDF file named "Test.pdf", it should print out
*********** attachment = {...., asset_file_name: "Test.pdf", asset_content_type: "application/pdf".... }
Desktop (please complete the following information):
Additional context s3_headers doesn't get called with attachment therefore attachment.asset_file_name returns nil
s3_headers
attachment
attachment.asset_file_name
The text was updated successfully, but these errors were encountered:
Hi @zainzafar Thanks for the bug report. If you can please submit a PR to fix this with a failing test case, that will be really great
Sorry, something went wrong.
Just to save some time searching, here is the commit when proc support was added
No branches or pull requests
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When uploading a PDF file named "Test.pdf", it should print out
Desktop (please complete the following information):
Additional context
s3_headers
doesn't get called withattachment
thereforeattachment.asset_file_name
returns nilThe text was updated successfully, but these errors were encountered: