question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error uploading on S3 through amplify storage reactjs

See original GitHub issue

I’m using the latest version of aws-amplify 3.3.7 on reactjs

This is the code

const s3Upload = async (file) => { 
    const filename = file.name.replace(/\s/g, '') 
    await Storage.vault.put(filename, file, { 
      contentType: file.type 
   })
}

When I try to upload small files (1 Mb file) it works fine, but when I try to upload bigger files i.e. 6 Mb zip file, I’m getting the error:

AWSS3ProviderManagedUpload - error happened while finishing the upload. Cancelling the multipart upload Error: Request failed with status code 40

Anyone faced this problem

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nerxhan-eduongocommented, Nov 18, 2020

I have implement this solution on my S3 bucket https://stackoverflow.com/questions/64681196/error-uploading-on-s3-through-amplify-storage-reactjs, and is working, not sure how secure is this

1reaction
sw-yxcommented, Nov 4, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error uploading on S3 through amplify storage reactjs
I've been having the same issue where after around 5MB, Amplify uses multipart upload and it fails with the same error.
Read more >
Storage - S3 Image - React - AWS Amplify Docs
Amplify S3 Image Component is used to upload and render an image from S3 bucket using an ... Description, Function executed when error...
Read more >
Upload Files To AWS S3 From React App —Using AWS Amplify
In this post though, we are going to look at how to use AWS Amplify to let users upload files to S3 buckets...
Read more >
How to Monitor Upload and Download Progress for Amplify ...
Tagged with amplify, javascript, s3, react. ... Amplify Storage has a callback that keeps you updated on the upload and download progress of ......
Read more >
Storage
AWS Amplify Storage module provides a simple mechanism for managing user content for ... The Storage category comes with built-in support for Amazon...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found