Open BalajiSriraman opened 4 months ago
Hey, @BalajiSriraman 👋. Can you clarify what size the file is that you're attempting to upload? And what's the total time it's taking to upload the file?
Hi @cwomack
around 9mb .apk file, but issue persists with files of size 300mb too
upload is quite quick, have got a 30mbps connection so around 3 sec for 9mb file
@BalajiSriraman, thank you for the additional context. We'll try to reproduce on our side and see if we can root cause the issue.
I have the same issue, ~randomly~ (on v6.4.3). For small files on KB doesn't seem to happen, but when using this library on MB files (pdf 6MB in my case) , the uploader.result
promise gets ~randomly~ rejected and next time for the same file returns status:"fulfilled"
re-using the same parts that uploaded the failed
attempt.
I'm using a bucket created externally from Amplify CLI... but added the exposedHeaders: 'x-amz-server-side-encryption', 'x-amz-request-id', 'x-amz-id-2', 'ETag'
After some more investigation, I got this working after the bucket is configured with the following CORS config.
For example:
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"POST",
"GET",
"HEAD",
"DELETE",
"PUT"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [
"ETag",
"x-amz-server-side-encryption",
"x-amz-request-id",
"x-amz-id-2"
],
"MaxAgeSeconds": 3000
}
]
Maybe this can be an issue of just adding to the docs that when importing a S3 bucket, add the correct config.
Same issue here, multi-part upload fails with version 6.5.3 with the above error Error: Invalid parameter for ComplteMultipartUpload API: [object Object]
(note typo in error message - CompleteMultipartUpload).
In my case user only has s3:PutObject
permissions on bucket. I tried the above settings and it got me further where now the file uploads but Amplify Storage - uploadData
crashes on the GET and HEAD which come at the end.
GET https://xxx.s3.xxx.amazonaws.com/upload/xxx.png?uploadId=xxx results in 404
HEAD https://xxx.s3.xxx.amazonaws.com/upload/xxx.png results in 403
Why do we need to execute the above 2 calls?
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Storage
Amplify Version
v6
Amplify Categories
storage
Backend
None
Environment information
Describe the bug
trying to upload a APK file to S3 bucket but facing Multipart issue
Expected behavior
Just normal file upload
Reproduction steps
Code
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response