Revert "Nitpicking."

This reverts commit ebd39fc082.
This commit is contained in:
Dmitriy Zaporozhets 2015-02-19 08:57:33 -08:00
parent 3c2139ed17
commit 7c3147e6e9
1 changed files with 2 additions and 3 deletions

View File

@ -5,10 +5,9 @@ class FilesController < ApplicationController
if uploader.file_storage?
if can?(current_user, :read_project, note.project)
# 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)
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)
send_file path, disposition: disposition
else
not_found!