Feature #7056

Download All Attachments in Issue

Added by Chris Haverman over 8 years ago. Updated 5 months ago.

Status:NewStart date:2010-12-06
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Attachments
Target version:Candidate for next major release
Resolution:

Description

Did a quick search to see if this had been reported; didn't see anything.

Basically I'd like there to be a way to download all attachments to an issue in a single click rather than each one separately.

compress_the_all_attachments_in_issue.patch Magnifier (8.93 KB) Mizuki ISHIKAWA, 2018-10-11 07:26

compress_the_all_attachments_in_issue_v2.patch Magnifier (12.9 KB) Mizuki ISHIKAWA, 2018-12-25 03:31

error_message.png (287 KB) Mizuki ISHIKAWA, 2018-12-25 03:45


Related issues

Related to Redmine - Feature #8708: Provide a "download multiple files at once" feature New 2011-06-29

History

#1 Updated by zac folk over 8 years ago

I agree, this would be really useful.

#2 Updated by Motaz Abuthiab over 6 years ago

+1

#3 Updated by Nicolas QUETGLAS over 5 years ago

+1

#4 Updated by Go MAEDA over 4 years ago

  • Related to Feature #8708: Provide a "download multiple files at once" feature added

#5 Updated by Nikolay Yurchenko about 2 years ago

+1

#6 Updated by Klément Grisel about 1 year ago

+1

#7 Updated by Mizuki ISHIKAWA 9 months ago

In order to realize this feature, I thought of compressing and downloading Issue's attachment.
By applying this patch, you can download all of the attached files as a zip file. (using gem rubyzip)

Non-ascii file names are garbled in older versions (Windows 7, Windows Vista, Windows XP).
Windows 7 is scheduled to end support in 2020.
https://github.com/rubyzip/rubyzip/wiki/Files-with-non-ascii-filenames

Any feedback on this patch is welcome.

#8 Updated by Go MAEDA 9 months ago

Thank you for posting the patch. Could you explain why attachments_to_zip method creates temporary files in Attachment.storage_path instead of tmp directory?

#9 Updated by Go MAEDA 9 months ago

I think the patch should consider the free space of the disk. Suppose that the total size of attachments of the issue is 1GB. If the free space of the disk is less than 1GB, the creation of a zip archive will fail and the server may stop working due to disk full.

Here are some ideas to avoid the problem.

  • Show an error message indicates no sufficient disk space if the total size of attachments exceeds the free disk space
  • Create and send a zip archive without creating a temporary file

#10 Updated by Mizuki ISHIKAWA 7 months ago

Go MAEDA wrote:

Thank you for posting the patch. Could you explain why attachments_to_zip method creates temporary files in Attachment.storage_path instead of tmp directory?

There was no particular reason. I changed the temporary file storage location to the tmp directory.

Go MAEDA wrote:

I think the patch should consider the free space of the disk. Suppose that the total size of attachments of the issue is 1GB. If the free space of the disk is less than 1GB, the creation of a zip archive will fail and the server may stop working due to disk full.

Here are some ideas to avoid the problem.

  • Show an error message indicates no sufficient disk space if the total size of attachments exceeds the free disk space
  • Create and send a zip archive without creating a temporary file

Thank you for your feedback.

Because I could not think of a good way to check disk space, I thought about limiting the maximum capacity of temporary files.

The maximum capacity of temporary file can be set in configration.yml.
By doing this setting, it is impossible to create a temporary file larger than the assumption of the server administrator.

#11 Updated by Go MAEDA 5 months ago

  • Target version set to Candidate for next major release

Also available in: Atom PDF