Skip to content
Snippets Groups Projects
Unverified Commit 729ef338 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

public url scaleway with disposition

parent ef28ac65
No related branches found
No related tags found
No related merge requests found
......@@ -14,5 +14,17 @@ module ActiveStorage
headers.merge({ "Content-Type" => content_type, "Content-MD5" => checksum, "Content-Disposition" => content_disposition })
end
private
def public_url(key, **options)
disposition, filename, content_type = options.values_at(:disposition, :filename, :content_type)
uri = URI.parse(object_for(key).public_url)
uri.query = URI.encode_www_form({
"response-content-disposition" => content_disposition_with(type: disposition, filename: filename),
"response-content-type" => content_type
})
uri.to_s
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment