mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 09:36:47 +10:00
Nitpicking.
This commit is contained in:
@@ -5,9 +5,10 @@ class FilesController < ApplicationController
|
||||
|
||||
if uploader.file_storage?
|
||||
if can?(current_user, :read_project, note.project)
|
||||
disposition = uploader.image? ? 'inline' : 'attachment'
|
||||
# Replace old notes location in /public with the new one in / and send the file
|
||||
path = uploader.file.path.gsub("#{Rails.root}/public",Rails.root.to_s)
|
||||
path = uploader.file.path.gsub("#{Rails.root}/public", Rails.root.to_s)
|
||||
|
||||
disposition = uploader.image? ? 'inline' : 'attachment'
|
||||
send_file path, disposition: disposition
|
||||
else
|
||||
not_found!
|
||||
|
||||
Reference in New Issue
Block a user