Browse Source

更改:附件返回绝对地址

pull/347/head
yystopf 2 years ago
parent
commit
f9753c948e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/views/api/v1/attachments/_simple_detail.json.jbuilder

+ 1
- 1
app/views/api/v1/attachments/_simple_detail.json.jbuilder View File

@@ -2,6 +2,6 @@ json.id attachment.id
json.title attachment.title
json.filesize number_to_human_size(attachment.filesize)
json.is_pdf attachment.is_pdf?
json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)
json.url Rails.application.config_for(:configuration)['platform_url'] + (attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)).to_s
json.created_on attachment.created_on.strftime("%Y-%m-%d %H:%M")
json.content_type attachment.content_type

Loading…
Cancel
Save