プロジェクト

全般

プロフィール

Vote #75384

未完了

Add support for download resume to attachments

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Attachments_19
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
19
version_id:
0
issue_org_id:
17452
author_id:
105975
assigned_to_id:
0
comments:
6
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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


journals

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
--------------------------------------------------------------------------------
Just tested it on my environment. It worked for me on my server, but it is proper configured.
--------------------------------------------------------------------------------
Thanks Daniel,

I'll apply necessary changes instructed by you and let you know the results.

Regards,
Amit
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------


related_issues

relates,Closed,17403,Unknown file size while downloading attachment

Admin Redmine さんが約2年前に更新

  • カテゴリAttachments_19 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0