-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File is not uploaded sometime #4343
Comments
I think we are seeing this issue as well.
|
Hi @shaangidwani, thanks for opening this issue. I tried to reproduce this but as you said seems it may happen sporadically. I will investigate this further to see if I can find a reproducible scenario that I can use to root cause the issue. Thanks! |
I've got the exact same issue using serverless framework and uploading to s3. Works most of the time then sometimes it won''t work, couple retries later it works. |
That's kinda wierd , never had this issue while uploading to s3: const S3 = require('aws-sdk/clients/s3')
const bucketName = process.env.AWS_BUCKET_NAME
const region = process.env.AWS_BUCKET_REGION
const accessKeyId = process.env.AWS_ACCESS_KEY
const secretAccessKey = process.env.AWS_SECRET_KEY
const s3 = new S3({
region,
accessKeyId,
secretAccessKey
})
//pass the file by using multer middleware
function uploadFile(file) {
const fileStream = fs.createReadStream(file.path)
const uploadParams = {
Bucket: bucketName,
Body:fileStream ,
Key: file.filename
}
return s3.upload(uploadParams).promise()
} |
Describe the bug
The user is trying to upload one file at that time we have captured the event progress and based on that we display the status of the file upload.
Sometimes when the user uploads the file, it shows 100%, but the file is not uploaded on the server without giving any error by the AWS js Utility.
Due to this issue, the system and user think the file is uploaded but has not been uploaded.
Expected Behavior
If the file is not uploaded on S3 it should give the proper error.
Current Behavior
Currently its not giving any error and file is not uploaded on s3
Reproduction Steps
Its random issue we have try after sometime same file is uploaded successfully without any issue with same source code
Possible Solution
Gives error so that system will not processed further and provide error to user.
Additional Information/Context
Here is the code which we are using :
SDK version used
AWS SDK for JavaScript v2.727.1
Environment details (OS name and version, etc.)
Windows OS
The text was updated successfully, but these errors were encountered: