Skip to content

Commit

Permalink
Merge pull request #16 from syamilmj/fix/signature-encoding
Browse files Browse the repository at this point in the history
Fix signature encoding
  • Loading branch information
Michael Ruoss authored Dec 16, 2020
2 parents fee763b + e86221e commit 34a1f33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gcs_signed_url.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defmodule GcsSignedUrl do
%StringToSign{string_to_sign: string_to_sign, url_template: url_template} =
StringToSign.generate_v2(client_email, bucket, filename, opts)

signature = Crypto.sign(string_to_sign, client) |> Base.encode64()
signature = Crypto.sign(string_to_sign, client) |> Base.encode64() |> URI.encode_www_form()
String.replace(url_template, "#SIGNATURE#", signature)
end

Expand Down

0 comments on commit 34a1f33

Please sign in to comment.