Skip to content
Snippets Groups Projects
Commit ebd39fc0 authored by Douwe Maan's avatar Douwe Maan
Browse files

Nitpicking.

parent 7d5f86f6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
disposition = uploader.image? ? 'inline' : 'attachment'
send_file path, disposition: disposition
else
not_found!
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment