summaryrefslogtreecommitdiffstats
path: root/app/models/attachment.rb
Commit message (Collapse)AuthorAgeFilesLines
* Uploading of attachments which filename contains non-ASCII chars fails with ↵Jean-Philippe Lang2012-04-061-0/+1
| | | | | | Ruby 1.9 on issue update (#10575). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9334 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white-spaces from app/models/attachment.rbToshi MARUYAMA2012-02-261-3/+3
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9012 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Better message for file size validation error.Jean-Philippe Lang2012-02-231-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8937 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds support for adding attachments to issues through the REST API (#8171).Jean-Philippe Lang2012-02-231-5/+16
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8928 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a rake test that removes old unattached uploads (#10253).Jean-Philippe Lang2012-02-161-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8893 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Better handling of attachments when issue validation fails (#10253).Jean-Philippe Lang2012-02-161-24/+37
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8891 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copy attachments on issue and project copy (#3055).Jean-Philippe Lang2012-01-201-4/+22
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8676 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Limit the characters stripped by Attachment#sanitize_filename (#4324).Jean-Philippe Lang2011-11-241-4/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7917 e93f8b46-1217-0410-a6f0-8f06a7374b81
* move logic to use latest image file attachment to class method for common ↵Toshi MARUYAMA2011-11-241-0/+6
| | | | | | use (#3261) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7908 e93f8b46-1217-0410-a6f0-8f06a7374b81
* fix inconsistent image filename extensions (#9638)Toshi MARUYAMA2011-11-231-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7891 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Rails3: replace deprecated 'after_destroy' method at Attachment model.Toshi MARUYAMA2011-08-301-1/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6763 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Rails3: replace deprecated 'before_save' method at Attachment model.Toshi MARUYAMA2011-08-301-1/+3
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6756 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Rails3: replace deprecate 'validate' instance method to declared validation ↵Toshi MARUYAMA2011-08-291-1/+2
| | | | | | method at Attachment model. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6714 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white-spaces from app/models/attachment.rb.Toshi MARUYAMA2011-08-221-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6526 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: file uploads broken by r6312 (#8912).Jean-Philippe Lang2011-07-291-1/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6320 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: MailHandler does not include JournalDetail for attached files (#7966).Jean-Philippe Lang2011-07-241-1/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6312 e93f8b46-1217-0410-a6f0-8f06a7374b81
* replace RAILS_ROOT to Rails.root of attachments storage path.Toshi MARUYAMA2011-06-151-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6074 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white-spaces from Attachment model source.Toshi MARUYAMA2011-05-151-22/+22
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5793 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Makes the folder for attachments storage configurable in ↵Jean-Philippe Lang2011-01-231-1/+1
| | | | | | config/configuration.yml (#1236). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4755 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Unused variableEric Davis2010-06-191-1/+0
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3774 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix a nil error when a Project cannot save attachments.Eric Davis2010-06-191-1/+7
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3772 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Refactor: Decouple failed attachments and the flash messagesEric Davis2010-03-031-7/+2
| | | | | | | | | | | Attachment#attach_files will no longer need to return a flash message, instead it will put unsaved attachments into object#unsaved_attachments where the calling object can access them. A utility method #render_attachment_warning_if_needed is included for setting the standard flash warning. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3528 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Refactor: Moved ApplicationController#attach_files to the Attachment modelEric Davis2010-03-021-0/+27
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3523 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: attachments with the same name at the same time overwrite (#3691).Jean-Philippe Lang2010-02-281-5/+9
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3511 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Auto-detect attachment content type when blank (#3782).Jean-Philippe Lang2009-12-291-0/+3
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3258 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Returns a 404 error when trying to view/download an attachment that can't be ↵Jean-Philippe Lang2009-04-251-0/+5
| | | | | | read from disk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2692 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes memory consumption on file upload (#3116).Jean-Philippe Lang2009-04-101-10/+9
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2670 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes that custom values length and attachment size validation error raises ↵Jean-Philippe Lang2009-04-081-1/+3
| | | | | | an error. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2667 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: Files without Version aren't visible in the Activity page (#2930).Jean-Philippe Lang2009-03-081-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2569 e93f8b46-1217-0410-a6f0-8f06a7374b81
* AttachmentsController now handles attachments deletion.Jean-Philippe Lang2008-12-091-0/+8
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2116 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: wrong digest for text files under Windows (#2264).Jean-Philippe Lang2008-12-021-1/+8
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2085 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Display latest user's activity on account/show view.Jean-Philippe Lang2008-11-301-0/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2066 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Activity refactoring.Jean-Philippe Lang2008-07-271-0/+12
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1701 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Appends the filename to the attachment url so that clients that ignore ↵Jean-Philippe Lang2008-07-221-1/+1
| | | | | | content-disposition http header get the real filename (#1649). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1686 e93f8b46-1217-0410-a6f0-8f06a7374b81
* File viewer for attached text files.Jean-Philippe Lang2008-06-091-0/+4
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1520 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Unified diff viewer for attached files with .patch or .diff extension (#1403).Jean-Philippe Lang2008-06-081-0/+4
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1516 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: TypeError in WikiController#destroy_attachment (#1281).Jean-Philippe Lang2008-05-221-3/+1
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@1444 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: possible error when attachment's filename is non-ASCII (#747, #1243, ↵Jean-Philippe Lang2008-05-171-1/+14
| | | | | | #1089). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1433 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Attachment model clean up: fixed some inconsistent indentation and an ↵Jean-Philippe Lang2008-04-021-49/+48
| | | | | | inaccurate comment (closes patch #903 by Rocco Stanzione). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1321 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Activity enhancements:Jean-Philippe Lang2008-03-111-1/+0
| | | | | | | * overall activity view and feed added, link is available on the project list (#423, #494) * switch added on the project activity view to include subprojects (closes #530) git-svn-id: http://redmine.rubyforge.org/svn/trunk@1227 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: error when uploading a file with no content-type specified by the ↵Jean-Philippe Lang2008-02-031-1/+1
| | | | | | browser. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1115 e93f8b46-1217-0410-a6f0-8f06a7374b81
* * Updated German translation (Thomas Löber)Jean-Philippe Lang2007-11-271-1/+1
| | | | | | | | * Updated Spanish translation (Gumer Coronel Pérez) * Fixed: test in method project in Attachment Model useless (Cyril Mougel) * Fixed: public/.htaccess lacks support for mod_fcgid and adds handlers without checking for their existance (Nils Adermann) git-svn-id: http://redmine.rubyforge.org/svn/trunk@934 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Anonymous users can now be allowed to create, edit, comment issues, comment ↵Jean-Philippe Lang2007-11-201-6/+1
| | | | | | | | news and post messages in the forums. These permissions need to be explicitly given to the Anonymous role (Admin -> Roles & Permissions -> Anonymous). git-svn-id: http://redmine.rubyforge.org/svn/trunk@919 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Activity view now uses events attributes.Jean-Philippe Lang2007-10-281-1/+1
| | | | | | Fixed: error on activity feed if it contains a document. git-svn-id: http://redmine.rubyforge.org/svn/trunk@876 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed: error when uploading a file with a content type longer than 60 chars.Jean-Philippe Lang2007-09-171-0/+4
| | | | | | (Maximum size changed to 255. Mime type not saved if longer) git-svn-id: http://redmine.rubyforge.org/svn/trunk@739 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Merged 0.6 branch into trunk.Jean-Philippe Lang2007-08-291-1/+5
| | | | | | | | | Permissions management was rewritten. Some permissions can now be specifically defined for non member and anonymous users. This migration: * is irreversible (please, don't forget to *backup* your database before upgrading) * resets role's permissions (go to "Admin -> Roles & Permissions" to set them after upgrading) git-svn-id: http://redmine.rubyforge.org/svn/trunk@674 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Image attachments are now sent inline to be viewed directly in the browser.Jean-Philippe Lang2007-08-151-0/+4
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@642 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Attachment content-type is now chomped before being saved.Jean-Philippe Lang2007-08-121-1/+1
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@617 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Added several validates_length_ofJean-Philippe Lang2007-07-161-1/+3
| | | | git-svn-id: http://redmine.rubyforge.org/svn/trunk@593 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Attachments can now be added to wiki pages (original patch by Pavol Murin). ↵Jean-Philippe Lang2007-05-261-1/+5
| | | | | | | | Only authorized users can add/delete attachments. Attached images can be displayed inline, using textile image tag (for wiki pages, issue descriptions and forum messages). git-svn-id: http://redmine.rubyforge.org/svn/trunk@541 e93f8b46-1217-0410-a6f0-8f06a7374b81