Merge branch 'dont-download-image-attachments'

Conflicts:
	CHANGELOG
This commit is contained in:
Dmitriy Zaporozhets 2015-02-05 09:54:38 -08:00
commit 0a9cab4ee6
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ v 7.8.0
- Cleaner UI for web editor - Cleaner UI for web editor
- Add diff syntax highlighting in email-on-push service notifications (Hannes Rosenögger) - 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) - 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) - Allow more variations for commit messages closing issues (Julien Bianchi and Hannes Rosenögger)
- -

View File

@ -5,7 +5,8 @@ class FilesController < ApplicationController
if uploader.file_storage? if uploader.file_storage?
if can?(current_user, :read_project, note.project) 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 else
not_found! not_found!
end end