Commit Graph

85 Commits

Author SHA1 Message Date
Go MAEDA
6369d139dd Uploading a big file fails with NoMemoryError (#33752).
Patch by Karel Pičman and Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@20993 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-05-11 05:35:19 +00:00
Go MAEDA
3e36b5c452 Update copyright year in source files to 2021 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@20846 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-03-25 06:58:56 +00:00
Toshi MARUYAMA
b3c19888c5 remove spaces inside {} of AttachmentsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20368 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-11-14 13:18:10 +00:00
Toshi MARUYAMA
14da3c7dc4 use "do end" instead of {} at AttachmentsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20278 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-11-06 13:00:52 +00:00
Toshi MARUYAMA
e7f6297e7c add empty line after guard clause to AttachmentsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20253 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-11-04 14:44:30 +00:00
Toshi MARUYAMA
8b0c21cbf8 avoid using rescue in its modifier form at AttachmentsController#find_container
git-svn-id: http://svn.redmine.org/redmine/trunk@19863 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-07-08 17:30:04 +00:00
Go MAEDA
ea54e1acdb Fix that bulk download raises Errno::EACCES on Windows (#7056).
Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19688 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-11 07:58:01 +00:00
Go MAEDA
fd75ebcd12 Replace File#readable? with Attachment#readable? (#7056).
git-svn-id: http://svn.redmine.org/redmine/trunk@19635 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-02 05:52:39 +00:00
Go MAEDA
4a7bc593af Display bulk_download_max_size in human-readable representation (#7056).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19609 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-23 05:52:40 +00:00
Go MAEDA
ab47fb8ae0 Download all attachments at once (#7056).
Patch by Mizuki ISHIKAWA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19601 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-21 05:59:31 +00:00
Go MAEDA
af36d450e4 Reverts r19569 (#33071).
404 error after deleting an attachment.


git-svn-id: http://svn.redmine.org/redmine/trunk@19579 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-14 03:49:44 +00:00
Go MAEDA
463e8163fc Require sudo mode for actions to delete contents (#33071).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19569 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-10 03:26:23 +00:00
Go MAEDA
907e0173e4 Update copyright year in source files to 2020 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@19553 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-03 00:24:10 +00:00
Go MAEDA
92232cc602 Fix "Couldn't find template for digesting" error in the log when sending an attachment or thumbnail (#20277).
Patch by Olivier Houdas.


git-svn-id: http://svn.redmine.org/redmine/trunk@19365 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-12-12 14:32:25 +00:00
Toshi MARUYAMA
2fc0555713 cleanup: rubocop: fix Layout/AlignArguments in app/controllers/attachments_controller.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18941 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-11-08 01:37:25 +00:00
Go MAEDA
2e0ec5b0e6 Remove trailing whitespaces from app (#31506).
Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@18230 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-06-06 14:47:34 +00:00
Go MAEDA
4082069c75 Update copyright year.
git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-25 07:36:06 +00:00
Go MAEDA
c4a4133178 Render PDF thumbnail using ImageMagick/GhostScript (#22481).
Patch by Gregor Schmidt.


git-svn-id: http://svn.redmine.org/redmine/trunk@18158 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-12 03:55:56 +00:00
Go MAEDA
6732ce9a93 Fix that Content-Type header field is empty when sending a file of unknown type (#31275).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18098 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-30 01:37:25 +00:00
Go MAEDA
bd5977d97e Support frozen_string_literal in app/**/*.rb (#26561).
Contributed by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@17987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-17 13:36:03 +00:00
Go MAEDA
5861160ffc Add "frozen_string_literal: false" for all files (#26561).
This will be changed to true in the future.


git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-15 01:32:57 +00:00
Jean-Philippe Lang
887b8d2fdf Adds a link to container on attachments edit form.
git-svn-id: http://svn.redmine.org/redmine/trunk@17722 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-12 18:51:34 +00:00
Go MAEDA
dcc7ecb34a Attachments prev/next navigation (#29395).
Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@17567 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-10-04 13:20:11 +00:00
Jean-Philippe Lang
7fd04e1f8d Update copyright.
git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-25 08:40:31 +00:00
Jean-Philippe Lang
4d4f330b0c Highlight menu item when viewing an attachment (#25988).
git-svn-id: http://svn.redmine.org/redmine/trunk@16652 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-10 10:48:34 +00:00
Jean-Philippe Lang
8e2983dd70 Don't check that param is a Hash.
git-svn-id: http://svn.redmine.org/redmine/trunk@16601 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-03 08:30:32 +00:00
Jean-Philippe Lang
c6bf632945 Use #skip_after_action instead of #skip_after_filter.
git-svn-id: http://svn.redmine.org/redmine/trunk@16589 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-01 18:29:18 +00:00
Jean-Philippe Lang
34c5b51cf0 Always send images user-uploaded images with Content-Disposition: attachment (#24199).
Patch by Holger Just.

git-svn-id: http://svn.redmine.org/redmine/trunk@16285 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-01-29 08:03:26 +00:00
Jean-Philippe Lang
696c510852 Add support for updating attachments over REST API (#22356).
git-svn-id: http://svn.redmine.org/redmine/trunk@15861 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-10-01 13:22:35 +00:00
Jean-Philippe Lang
a2bcc9c40e Rename AttachmentsController#edit and #update to #edit_all and #update_all (#22356).
git-svn-id: http://svn.redmine.org/redmine/trunk@15860 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-10-01 12:46:29 +00:00
Jean-Philippe Lang
76bf2404d5 Allow to download javascript attachments again (#23376).
Patch by Holger Just.

git-svn-id: http://svn.redmine.org/redmine/trunk@15856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-10-01 09:24:34 +00:00
Jean-Philippe Lang
cad0036297 Use head instead of render :nothing => true.
git-svn-id: http://svn.redmine.org/redmine/trunk@15687 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-07-17 06:35:28 +00:00
Jean-Philippe Lang
ee82a55602 Use .before_action instead of .before_filter.
git-svn-id: http://svn.redmine.org/redmine/trunk@15655 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-07-14 07:27:31 +00:00
Jean-Philippe Lang
3e776af806 Don't force download of PDF (#22483).
Patch by Gregor Schmidt.

git-svn-id: http://svn.redmine.org/redmine/trunk@15409 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-05-09 17:22:23 +00:00
Jean-Philippe Lang
b553b23e6b Show attachment view even is no preview is available (#22482).
Patch by Gregor Schmidt.

git-svn-id: http://svn.redmine.org/redmine/trunk@15398 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-05-08 08:04:51 +00:00
Jean-Philippe Lang
130424fc3e Support for deleting attachments via API (#14828).
Patch by Takenori TAKAKI.

git-svn-id: http://svn.redmine.org/redmine/trunk@15332 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-04-12 19:18:34 +00:00
Jean-Philippe Lang
2fbce6515d Add inline image preview/display for attachments and repository entries (#22058).
Patch by Jan Schulz-Hofen.

git-svn-id: http://svn.redmine.org/redmine/trunk@15324 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-04-11 19:17:48 +00:00
Jean-Philippe Lang
3e1d2c0924 Fix that AttachmentsController#show don't close the file after reading.
git-svn-id: http://svn.redmine.org/redmine/trunk@15289 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-04-03 11:41:41 +00:00
Jean-Philippe Lang
cda9c63d9c Updates copyright for 2016.
git-svn-id: http://svn.redmine.org/redmine/trunk@15238 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-03-13 10:30:10 +00:00
Jean-Philippe Lang
0b04de0a23 Send a better content type than application/octet-stream (#19131).
git-svn-id: http://svn.redmine.org/redmine/trunk@14034 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-02-19 17:46:24 +00:00
Jean-Philippe Lang
000124f44f Copyright update.
git-svn-id: http://svn.redmine.org/redmine/trunk@13872 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-11 09:09:50 +00:00
Jean-Philippe Lang
12890945e5 Allow attachment thumbnails from REST API (#18707).
git-svn-id: http://svn.redmine.org/redmine/trunk@13806 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-26 11:26:24 +00:00
Jean-Philippe Lang
93690ee830 Send the content type as parameter when uploading a file.
git-svn-id: http://svn.redmine.org/redmine/trunk@13788 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 21:07:13 +00:00
Jean-Philippe Lang
288c014aa7 Edit attachments after upload (#1326).
git-svn-id: http://svn.redmine.org/redmine/trunk@13665 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-11-29 13:41:53 +00:00
Toshi MARUYAMA
c1f17037e4 fix variable name confusion at AttachmentsController#thumbnail
This is suggested by Rails team.
https://github.com/rails/rails/issues/15471#issuecomment-45419147

git-svn-id: http://svn.redmine.org/redmine/trunk@13176 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-06-08 04:23:59 +00:00
Toshi MARUYAMA
35cc911192 update copyright year (#15977)
Contributed by Daniel Felix.

git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-29 22:45:39 +00:00
Jean-Philippe Lang
e396a0eebe Copyright for 2013 (#12788).
Patch by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-12 09:29:31 +00:00
Jean-Philippe Lang
c87f36d20b Log an error when trying to send an attachment that cannot be read.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11084 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-26 14:00:10 +00:00
Jean-Philippe Lang
ef25210aca Merged ajax_upload branch (#3957).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10977 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-10 20:09:41 +00:00
Jean-Philippe Lang
251f263abd Let the attachment filename be specified on upload (#12125).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10678 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-18 21:06:35 +00:00