question

Christian Krebs avatar image
Christian Krebs asked

File Management: upload from extern (AWS: SignatureDoesNotMatch)

Hi,

since friday I try to Upload a json file from extern (Google SpreadSheet) to the File Management.

I managed to receive the GetContentUploadURL after several tries and research.

What I really cannot figuring out is how to use this URL now, to upload my simple json file to the playfab file management.

The Idea is to upload them directly, credentials + pw needed, to playfab to minimize effort.

But when I use the URL I always receive

<Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>

I guess my main problem is that I didn't know the structure of what the AWS is waiting for, so what params it needs (headers, payload, etc.).

Hopefully someone can help me.

Kind regards,

Chris

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Generally, the params AWS needs have been contained in the URL. And uploading contents via this URL doesn’t need some headers. The possible reason that causes SignatureDoesNotMatch error is you didn’t send an http PUT request to this URL. Please make sure you use PUT request when you upload a file, the name of files you upload also need to be the same as the FileNames field which in the InitiateFileUploads API call's request body. There is a sample in this doc Entity files, you can check the doc for the process of uploading the Entity files. You also can use some external REST API testing tools (like Postman) to test PlayFab API and other http request before you use them formally. You can find its PlayFab SDK on the SDK page.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Christian Krebs avatar image Christian Krebs commented ·

Thanks a lot! It works now :-)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.