normalize file urls

This commit is contained in:
DocuSeal authored and Pete Matsyburka committed 2023-11-08 15:25:19 +02:00
1 parent fc11078cae
commit 44a49a4533
2 files changed
+2 -2

No files matched your search

@@ -35,7 +35,7 @@ class TemplatesUploadsController < ApplicationController
def create_file_params_from_url
tempfile = Tempfile.new
tempfile.binmode
tempfile.write(conn.get(params[:url]).body)
tempfile.write(conn.get(Addressable::URI.parse(params[:url]).display_uri.to_s).body)
tempfile.rewind
file = ActionDispatch::Http::UploadedFile.new(