Commit db6b9254 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

skip protection to aws3

parent ddad27dd5787
class FilesController < ApplicationController class FilesController < ApplicationController
def download def download
uploader = Note.find(params[:id]).attachment uploader = Note.find(params[:id]).attachment
send_file uploader.file.path, disposition: 'attachment' send_file uploader.file.path, disposition: 'attachment'
end end
end end
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
end end
def secure_url def secure_url
"/files/#{model.class.to_s.underscore}/#{}/#{file.filename}" if == CarrierWave::Storage::File
end end
end end
Supports Markdown
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