Go MAEDA
7763902629
Use Redmine::MimeType.of instead of regexp to check if the attachment is Textile ( #29752 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@18586 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-03 09:30:43 +00:00
Go MAEDA
3ce678510e
Render Textile and Markdown attachments on the preview page ( #29752 ).
...
Patch by Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@18584 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-03 00:09:28 +00:00
Toshi MARUYAMA
a8c1fc77ef
code cleanup: rubocop: fix Layout/EmptyLinesAroundBlockBody in app/models/attachment.rb
...
git-svn-id: http://svn.redmine.org/redmine/trunk@18558 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-30 08:59:54 +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
400e1ca2ff
Attachment preview does not work for some source files such as JavaScript and Go ( #29259 ).
...
Patch by Go MAEDA with the help of Stephan Wenzel's contribution.
git-svn-id: http://svn.redmine.org/redmine/trunk@18122 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-04 09:32:05 +00:00
Go MAEDA
72e1451159
Use Regexp#match? to reduce allocations of MatchData object ( #28940 ).
...
Patch by Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@18011 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-27 02:15:24 +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
Go MAEDA
4c38f46184
Makes sure the generated thumbnail is always of at least the requested size ( #13688 ).
...
Patch by Jens Krämer and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17850 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-02-05 13:50:20 +00:00
Go MAEDA
cccd14ae5c
Deletes thumbnails when the attachment diskfile is deleted ( #30177 ).
...
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@17736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-15 02:58:45 +00:00
Go MAEDA
bda0de0044
Allows re-use of thumbnails for identical attachments ( #30177 ).
...
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@17735 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-15 02:37:00 +00:00
Go MAEDA
e159928e6b
Use find_by instead of where.first to remove unnecessary sorting ( #26747 ).
...
Patch by Yuichi HARADA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17586 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-10-06 16:03:26 +00:00
Go MAEDA
51fdc31e1c
"thumbnail" macro may break filename attribute of the attachment ( #29038 ).
...
Patch by Toru Takahashi.
git-svn-id: http://svn.redmine.org/redmine/trunk@17428 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-07-02 02:36:22 +00:00
Go MAEDA
37d1fcf8a4
Adds previews for audio / video attachments ( #27336 ).
...
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@17340 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-05-17 13:09:43 +00:00
Jean-Philippe Lang
d74f0bfd5c
Merged rails-5.1 branch ( #23630 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@16859 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-07-23 11:26:04 +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
8a3c24762d
Preview files by default instead of downloading them ( #25988 ).
...
Patch by Jan Schulz-Hofen.
git-svn-id: http://svn.redmine.org/redmine/trunk@16651 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-10 10:30:59 +00:00
Jean-Philippe Lang
4d5ddb0072
Prevent deadlocks by only locking the exact records we need to have locked ( #25590 ).
...
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16541 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-13 12:10:03 +00:00
Jean-Philippe Lang
0e407dcf46
Delete the file after the change is committed ( #25215 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@16460 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 12:13:07 +00:00
Jean-Philippe Lang
2f83c57be4
Adds file equality check to deduplication hook ( #25215 ).
...
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16459 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:55:40 +00:00
Jean-Philippe Lang
f0e5437d27
Reuse existing identical disk files for new attachments ( #25215 ).
...
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16458 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:54:29 +00:00
Jean-Philippe Lang
1e179a9bbc
Change MD5 table header to Checksum ( #25240 ).
...
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16456 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:41:52 +00:00
Jean-Philippe Lang
ee84b6b24c
Adds a rake task to update attachments digests to SHA256 ( #25240 ).
...
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16455 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:38:06 +00:00
Jean-Philippe Lang
30f7be9c19
Changes the digest used for attachments to SHA256 ( #25240 ).
...
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16454 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:11:36 +00:00
Jean-Philippe Lang
dac7903da3
Fixes uploading of empty files ( #25115 ).
...
- prevents creation of attachment records without existing diskfile and empty
digest
- adds test case to check file upload API response
- also removes the file size check in ActsAsAttachable which still prevented
attachment of zero size attachments to containers but only for clients
without Javascript (where save_attachments is called with the actual file
upload).
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16341 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-02-28 18:05:17 +00:00
Jean-Philippe Lang
20be00e437
Restrict the length attachment filenames on disk ( #24186 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@16083 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-12-16 08:45:41 +00:00
Jean-Philippe Lang
f94711ea8c
Option to specify allowed extensions for a file custom field ( #6719 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@15921 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-10-23 11:00:02 +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
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
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
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
3ffdc863de
Removes attachment from disk after rollback on create ( #21125 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@15085 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-01-21 05:38:55 +00:00
Jean-Philippe Lang
dd1c5f8900
Files upload restriction by files extensions ( #20008 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@14792 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-11-01 10:41:02 +00:00
Jean-Philippe Lang
e045215db7
Remove attachment after transaction commit ( #20388 ).
...
Patch by Ivan Zabrovskiy.
git-svn-id: http://svn.redmine.org/redmine/trunk@14630 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-09-30 18:59:51 +00:00
Jean-Philippe Lang
ef003caab2
Wrong syntax for resizing inline images may throw a 500 error ( #20278 ).
...
Fix by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@14473 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-08-02 07:25:23 +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
64763bece3
Attachment content type not set when uploading attachment ( #18667 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13787 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 21:02:38 +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
Jean-Philippe Lang
65997d4ff8
Removed unused instance variable.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13524 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-28 18:50:25 +00:00
Jean-Philippe Lang
78f65df8f7
Code cleanup.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13523 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-28 18:48:07 +00:00
Jean-Philippe Lang
498a34403a
Removed unneeded :foreign_key option on belongs_to associations.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13484 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-22 18:41:03 +00:00
Jean-Philippe Lang
2d1866d966
Merged rails-4.1 branch ( #14534 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-22 17:37:16 +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
f4aff7919a
Log errors when moving attachments ( #15295 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12249 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-09 09:46:55 +00:00
Jean-Philippe Lang
cfc65d9397
NoMethodError when uploading a file without logger ( #14977 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12202 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-10-05 11:37:57 +00:00
Jean-Philippe Lang
02fca76c13
Strip eols from file names ( #14819 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12128 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-09-11 19:19:24 +00:00
Toshi MARUYAMA
3d7819ed82
remove trailing white-space from app/models/attachment.rb
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11267 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-26 00:47:29 +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
c99b638d61
Store attachments in subdirectories ( #5298 ).
...
Existing files can be moved to their target subdirectories using rake redmine:attachments:move_to_subdirectories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10990 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-13 12:07:19 +00:00