"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/controllers/attachments_controller.rb" between
redmine-4.0.3.tar.gz and redmine-4.0.4.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

attachments_controller.rb  (redmine-4.0.3):attachments_controller.rb  (redmine-4.0.4)
skipping to change at line 240 skipping to change at line 240
def delete_authorize def delete_authorize
@attachment.deletable? ? true : deny_access @attachment.deletable? ? true : deny_access
end end
def detect_content_type(attachment) def detect_content_type(attachment)
content_type = attachment.content_type content_type = attachment.content_type
if content_type.blank? || content_type == "application/octet-stream" if content_type.blank? || content_type == "application/octet-stream"
content_type = Redmine::MimeType.of(attachment.filename) content_type = Redmine::MimeType.of(attachment.filename)
end end
content_type.to_s content_type.presence || "application/octet-stream"
end end
def disposition(attachment) def disposition(attachment)
if attachment.is_pdf? if attachment.is_pdf?
'inline' 'inline'
else else
'attachment' 'attachment'
end end
end end
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)