Image attachments are now sent inline to be viewed directly in the browser.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@642 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -84,6 +84,10 @@ class Attachment < ActiveRecord::Base
|
||||
container.is_a?(Project) ? container : container.project
|
||||
end
|
||||
|
||||
def image?
|
||||
self.filename =~ /\.(jpeg|jpg|gif|png)$/i
|
||||
end
|
||||
|
||||
private
|
||||
def sanitize_filename(value)
|
||||
# get only the filename, not the whole path
|
||||
|
||||
Reference in New Issue
Block a user