Commit ebd39fc0 authored by Douwe Maan's avatar Douwe Maan

Nitpicking.

parent 7d5f86f6
......@@ -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!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment