title: How to set the Content Disposition header with Paperclip / fog for a file hosted on S3?
body: <p>I'm using Paperclip 4.2.0 and fog 1.24.0, and host files on S3. I want to generate an expiring URL that has the "Content-Disposition" header set to "attachment".</p>
  
  <p>Paperclip has <a href="https://github.com/thoughtbot/paperclip/pull/769" rel="nofollow">this option</a> to pass additional parameters to S3 expiring URLs but I can't have it working when using Paperclip with <code>Paperclip::Storage::Fog</code>.</p>
  
  <p>This <a href="https://github.com/fog/fog/issues/1776" rel="nofollow">fog issue</a> gives the following solution:</p>
  
  <p><code>file.url(60.seconds.from_now, { :query =&gt; { 'response-content-disposition' =&gt; 'attachment' } }</code></p>
  
  <p>but it does not work for me. My Rails model <code>ResourceDocument</code> has <code>has_attached_file :target</code>. <code>document.target.url(60.seconds.from_now, { :query =&gt; { 'response-content-disposition' =&gt; 'attachment' } }</code> returns the same URL than <code>document.target.url(60.seconds.from_now)</code>, ie no content-disposition is included in the generated URL: "xxx.s3.amazonaws.com/uploads/resource_documents/targets/40/2014-12-01%2017:26:20%20UTC/my_file.csv"</p>