Commit 0a9cab4e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'dont-download-image-attachments'

Conflicts:
	CHANGELOG
parents 50e8e594 8efed8b3
......@@ -9,7 +9,7 @@ v 7.8.0
- Cleaner UI for web editor
- Add diff syntax highlighting in email-on-push service notifications (Hannes Rosenögger)
- Add API endpoint to fetch all changes on a MergeRequest (Jeroen van Baarsen)
-
- View note image attachments in new tab when clicked instead of downloading them
-
- Allow more variations for commit messages closing issues (Julien Bianchi and Hannes Rosenögger)
-
......
......@@ -5,7 +5,8 @@ class FilesController < ApplicationController
if uploader.file_storage?
if can?(current_user, :read_project, note.project)
send_file uploader.file.path, disposition: 'attachment'
disposition = uploader.image? ? 'inline' : 'attachment'
send_file uploader.file.path, disposition: disposition
else
not_found!
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment