Commit 7c3147e6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Revert "Nitpicking."

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