Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
0a9cab4e
Commit
0a9cab4e
authored
Feb 05, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dont-download-image-attachments'
Conflicts: CHANGELOG
parents
50e8e594
8efed8b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
CHANGELOG
CHANGELOG
+1
-1
app/controllers/files_controller.rb
app/controllers/files_controller.rb
+2
-1
No files found.
CHANGELOG
View file @
0a9cab4e
...
...
@@ -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)
-
...
...
app/controllers/files_controller.rb
View file @
0a9cab4e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment