diff options
author | Go MAEDA <maeda@farend.jp> | 2019-06-06 14:47:34 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-06-06 14:47:34 +0000 |
commit | 2e0ec5b0e66d288a476d79b2163a316dbbed0f8c (patch) | |
tree | cdd82de304e23392567e3323c89d18d025eb1bc0 /app/controllers | |
parent | ac6ab7e74e21f748c2361b6dc35464db629d95f5 (diff) | |
download | redmine-2e0ec5b0e66d288a476d79b2163a316dbbed0f8c.tar.gz redmine-2e0ec5b0e66d288a476d79b2163a316dbbed0f8c.zip |
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
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/attachments_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/previews_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index c5f615d20..5d705844b 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -239,7 +239,7 @@ class AttachmentsController < ApplicationController def detect_content_type(attachment, is_thumb = false) content_type = attachment.content_type if content_type.blank? || content_type == "application/octet-stream" - content_type = + content_type = Redmine::MimeType.of(attachment.filename).presence || "application/octet-stream" end diff --git a/app/controllers/previews_controller.rb b/app/controllers/previews_controller.rb index 716d27cae..e431ab0de 100644 --- a/app/controllers/previews_controller.rb +++ b/app/controllers/previews_controller.rb @@ -18,7 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class PreviewsController < ApplicationController - before_action :find_project, :except => :text + before_action :find_project, :except => :text before_action :find_attachments def issue |