Templates Plugins Courses

AWS File Uploader bug with 'Add prefix to filename'

Hello, today I’ve been dealing with a problem in AWS File Uploader. All attempts to upload a file fail when I use the ‘Add prefix to filename’ feature. When this is enabled the PUT request to upload the file to S3 returns a 403 with the following response:

SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.

If I disable ‘Add prefix to filename’ there are no problems.

Can you please advise?

Hello @galenkrumel, thank you for reaching out!

This error may appear if something is not set up correctly in the AWS dashboard. Please check our documentation and make sure you followed all steps stipulated there.

Best Regards,

I’m rather confident that I followed the steps in the documentation. These are the steps that I used to reproduce the problem:

  1. Follow setup guide in the documentation.

  2. When configuring the plugin, check the box for ‘Add prefix to filename’.
    => In my case, this results in a prefix of “Test Data” being added to the filename.

  3. Execute the plugin on my site, using the browser developer tools to observe HTTP traffic.
    => Two requests are sent to AWS. The first request is to Cognito and returns signing information (access key, secret key, etc). The second request is to S3 to PUT the file. This second request returns the 403. The file was not added to S3.

  4. Using Postman, replay these two requests. Leverage the Authentication feature of Postman to ensure that the second request is properly signed.
    => The S3 PUT is successful. This indicates that the PUT request can be completed successfully from the client, and there are no problems with my AWS configuration.

  5. Now uncheck ‘Add prefix to filename’.

  6. Execute the plugin on my site.
    => The file now uploads successfully.

I’m happy to assist with further debugging, but at this point I’m pretty confident that my AWS configuration is correct.

Hello @galenkrumel,

Thank you for providing a detailed step by step description on how to reproduce the problem, it helped a lot. We checked the problem and it seems that plugin does have a bug. Our team will check what may be the cause of the bug and will fix it. I will let you know when the updated version of the plugin with bug fixes will be published.

Best Regards,

Hello @galenkrumel,

We pushed an update for the plugin that should address the issue you were facing. Please update the plugin and check if everything is fine on your side.

Best Regards,