Commit 748a384d by Ivan

fix: URI.join -> File.join

parent 6d590da3
......@@ -281,7 +281,7 @@ module TalltyImportExport
when 'file'
if data.is_a?(Array) && !opts[:keep_array]
data.map do |item|
url = item.dig('url') || (item.dig('downloadPath') ? URI.join(ENV['SOA_FILE_DOWNLOAD_HOST'], item.dig('downloadPath')) : nil)
url = item.dig('url') || (item.dig('downloadPath') ? File.join(ENV['SOA_FILE_DOWNLOAD_HOST'], item.dig('downloadPath')) : nil)
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'))}" :
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