Commit 74ec4dbc by Ivan

feat: 文件导出适配 base file server

parent 6d35b774
...@@ -281,7 +281,7 @@ module TalltyImportExport ...@@ -281,7 +281,7 @@ module TalltyImportExport
when 'file' when 'file'
if data.is_a?(Array) && !opts[:keep_array] if data.is_a?(Array) && !opts[:keep_array]
data.map do |item| data.map do |item|
url = item.dig('url') url = item.dig('url') || item.dig('downloadPath')
url.present? ? url.present? ?
"#{url}?fileName=#{URI.encode_www_form_component(item.dig('fileName'))}&fileSize=#{URI.encode_www_form_component(item.dig('fileSize'))}&mimeType=#{URI.encode_www_form_component(item.dig('mimeType') || item.dig('fileType'))}" : "#{url}?fileName=#{URI.encode_www_form_component(item.dig('fileName'))}&fileSize=#{URI.encode_www_form_component(item.dig('fileSize'))}&mimeType=#{URI.encode_www_form_component(item.dig('mimeType') || item.dig('fileType'))}" :
nil nil
......
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