You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure whether this is a arc or arc_ecto or ex_aws issue, when I upload the image that works fine I guess, at least there are no errors. now while fetching the image like this MyApp.Avatar.url({ user.photo, user}, :thumb, signed: true)
it throws this error:
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>
The request signature we calculated does not match the signature you provided. Check your key and signing method.
</Message>
<AWSAccessKeyId>ACCESSID</AWSAccessKeyId>
<StringToSign>
AWS4-HMAC-SHA256 20160613T132235Z 20160613/us-east-1/s3/aws4_request 3119114
</StringToSign>
<SignatureProvided>
f1e2764695
</SignatureProvided>
<StringToSignBytes>
stuff
</StringToSignBytes>
<CanonicalRequest>
GET /memento-is-dev/uploads/Screenshot%20from%202016-05-24%2014%3A43%3A13.png X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ACCESS%2F20160613%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160613T131355Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&v=63633027268 host:s3.amazonaws.com host UNSIGNED-PAYLOAD
</CanonicalRequest>
<CanonicalRequestBytes>
stuff
</CanonicalRequestBytes>
<HostId>
fjO3c4Y=
</HostId>
</Error>
I am using ecto 1.x with arc_ecto 0.3.2 and arc 0.5
here is some code in the controller to insert an image:
case Repo.insert(changeset) do
{:ok, prof} ->
IO.inspect prof
Expense.Avatar.store({transaction_params["image"], prof})
conn
|> put_flash(:info, "Profile created successfully")
|> redirect(to: user_profile_path(conn, :index, user_id))
{:error, changeset} ->
render(conn, "index.html", changeset: changeset)
end
The text was updated successfully, but these errors were encountered:
I'm getting this problem too, this is because of the v (version) query parameter that is added to the url. According to the aws documentation every query parameter and header should be used to calculate the signature.
I don't really see the point of adding this parameter for signed urls, I think it could be removed when the option signed is true. If there's a reason to keep it, it should be passed along to ex_aws in some way.
As a workaround I'm manually removing this parameter from the url for now
I am not sure whether this is a arc or arc_ecto or ex_aws issue, when I upload the image that works fine I guess, at least there are no errors. now while fetching the image like this
MyApp.Avatar.url({ user.photo, user}, :thumb, signed: true)
it throws this error:
I am using ecto 1.x with arc_ecto 0.3.2 and arc 0.5
here is some code in the controller to insert an image:
The text was updated successfully, but these errors were encountered: