https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292014-07-14T07:09:24ZRedmineRedmine - Feature #17452: Add support for download resume to attachmentshttps://www.redmine.org/issues/17452?journal_id=575102014-07-14T07:09:24ZDaniel Felix
<ul></ul><p>Hi there,</p>
<p>this should be done by adding a new header and some client side server configuration..</p>
<p>This releates to change in <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Unknown file size while downloading attachment (Closed)" href="https://www.redmine.org/issues/17403#note-5">#17403-5</a></p>
<p>Adding this line at the same position(<a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/app/controllers/attachments_controller.rb#L57">source:trunk/app/controllers/attachments_controller.rb#L57</a>):</p>
<p><code><br />headers['Accept-Ranges'] = "bytes" <br /></code></p>
<p>Also replace the send_file command with this one: <br /><code> <br />send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),<br /> :type => detect_content_type(@attachment),<br /> :disposition => (@attachment.image? ? 'inline' : 'attachment'),<br /> :x_sendfile => true<br /></code></p>
<p>Please mark the :x_sendfile => true setting at the end.</p>
<p>This is the rails part. On the otherhand your NGINX or Apache-Server needs to know how to handle streamed files. On an Apache you need the mod_xsendfile enabled.</p>
<p>Hope this helps. Feedback would be appreciated. This is untested and just pasted out of the memory. Please test this first in a development environment.</p>
<p>Best regards,<br />Daniel</p> Redmine - Feature #17452: Add support for download resume to attachmentshttps://www.redmine.org/issues/17452?journal_id=575112014-07-14T07:31:11ZDaniel Felix
<ul></ul><p>Just tested it on my environment. It worked for me on my server, but it is proper configured.</p> Redmine - Feature #17452: Add support for download resume to attachmentshttps://www.redmine.org/issues/17452?journal_id=575122014-07-14T07:34:27ZAmit Baswa
<ul></ul><p>Thanks Daniel,</p>
<p>I'll apply necessary changes instructed by you and let you know the results.</p>
<p>Regards,<br />Amit</p> Redmine - Feature #17452: Add support for download resume to attachmentshttps://www.redmine.org/issues/17452?journal_id=575262014-07-14T13:20:35ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Tracker</strong> changed from <i>Defect</i> to <i>Feature</i></li><li><strong>Subject</strong> changed from <i>Attachment does not Supported Resume Download</i> to <i>Add support for download resume to attachments</i></li></ul> Redmine - Feature #17452: Add support for download resume to attachmentshttps://www.redmine.org/issues/17452?journal_id=578732014-08-05T10:48:02ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/17403">Defect #17403</a>: Unknown file size while downloading attachment</i> added</li></ul> Redmine - Feature #17452: Add support for download resume to attachmentshttps://www.redmine.org/issues/17452?journal_id=954932020-01-04T13:32:17ZMeiki Neumann
<ul></ul><p>Nothing yet ?! <br />I did all of the Daniel Felix' instructions and my NGINX configuration is OK with another service ( Supports resume) but not on redmine files</p>