mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Save documents on disk
This commit is contained in:
parent
a99d36f683
commit
79f76b2ccf
6 changed files with 41 additions and 6 deletions
|
@ -3,7 +3,7 @@ class Admin::LegalDocumentsController < AdminController
|
|||
|
||||
def show
|
||||
@ld = LegalDocument.find(params[:id])
|
||||
file = Base64.decode64(@ld.body)
|
||||
send_data file, filename: "#{@ld.created_at}.#{@ld.document_type}"
|
||||
filename = @ld.path.split('/').last
|
||||
send_data File.open(@ld.path).read, filename: filename
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue