Feature #17452
openAdd support for download resume to attachments
0%
Description
Hi Redmine,
Issue: When we download attachments from Redmine issues, the resume is not supported to this download. It will be fine for low size attachments, but we do have attachments more than 100MB.
Scenario: While downloading file (> 100MB), sometime it is possible that internet connection loss and after a while it comes back. At this time we are unable to Resume redmine attachment download and we have to start from Zero(0).
Proposed Solution: Attachment download should support Resume to avoid waste of time in re-downloading file unnecessarily
Environment:
Redmine version 2.4.2.stable
Ruby version 2.0.0-p247 (2013-06-27) [x86_64-linux]
Rails version 3.2.16
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.11
Git 1.9.3
Filesystem
Redmine plugins:
redmine_auto_watch 1.0.0
redmine_issue_checklist 2.0.5
redmine_overdue_notification_task 0.3.0
redmine_work_time 0.2.14
sidebar_hide 0.0.7
Attached File: Proof of Resume not supported.
Regards,
Amit
Files
Related issues
Updated by Daniel Felix over 10 years ago
Hi there,
this should be done by adding a new header and some client side server configuration..
This releates to change in #17403-5
Adding this line at the same position(source:trunk/app/controllers/attachments_controller.rb#L57):
headers['Accept-Ranges'] = "bytes"
Also replace the send_file command with this one:
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:disposition => (@attachment.image? ? 'inline' : 'attachment'),
:x_sendfile => true
Please mark the :x_sendfile => true setting at the end.
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.
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.
Best regards,
Daniel
Updated by Daniel Felix over 10 years ago
Just tested it on my environment. It worked for me on my server, but it is proper configured.
Updated by Amit Baswa over 10 years ago
Thanks Daniel,
I'll apply necessary changes instructed by you and let you know the results.
Regards,
Amit
Updated by Jean-Philippe Lang over 10 years ago
- Tracker changed from Defect to Feature
- Subject changed from Attachment does not Supported Resume Download to Add support for download resume to attachments
Updated by Toshi MARUYAMA over 10 years ago
- Related to Defect #17403: Unknown file size while downloading attachment added
Updated by Meiki Neumann almost 5 years ago
Nothing yet ?!
I did all of the Daniel Felix' instructions and my NGINX configuration is OK with another service ( Supports resume) but not on redmine files