mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Merge pull request #3607 from okriuchykhin/ok_SCI_6142
Change the assets URL returned by API to pre-signed url [SCI-6142]
This commit is contained in:
commit
17a4afc6fa
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ module Api
|
||||||
end
|
end
|
||||||
|
|
||||||
def file_url
|
def file_url
|
||||||
rails_blob_url(object.file, disposition: 'attachment') if object.file.attached?
|
object.file.url if object.file.attached?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,7 +22,7 @@ module Api
|
||||||
end
|
end
|
||||||
|
|
||||||
def pdf_file_url
|
def pdf_file_url
|
||||||
rails_blob_path(object.pdf_file, disposition: 'attachment')
|
object.pdf_file.url if object.pdf_file.attached?
|
||||||
end
|
end
|
||||||
|
|
||||||
def docx_file_size
|
def docx_file_size
|
||||||
|
@ -30,7 +30,7 @@ module Api
|
||||||
end
|
end
|
||||||
|
|
||||||
def docx_file_url
|
def docx_file_url
|
||||||
rails_blob_path(object.docx_file, disposition: 'attachment')
|
object.docx_file.url if object.docx_file.attached?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue