Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.
This repository was archived by the owner on Feb 12, 2021. It is now read-only.

timeout error while uploading after 100% #222

@manoj-compro

Description

@manoj-compro

I was also facing the same issue (Error: Non-file stream objects are not supported with SigV4 in AWS.S3) but after updating as per your suggestion I m getting an timeout error somehow. After 100% its end event does not get fired. Thanks in advance. As I m new to this so may be I am missing something here.

Here is the details :
"aws-sdk": "^2.478.0",
"s3": "^4.4.0",

const awsS3Client = new AWS.S3({
accessKeyId: argv.accessKeyId,
secretAccessKey: argv.secretAccessKey,
region: 'us-east-2',
signatureVersion: 'v4'
});

const client = s3.createClient({
s3Client: awsS3Client
});

let uploaderObj;

uploaderObj = client.uploadDir(params);

let prevProgress = 0;
uploaderObj.on('progress', function () {
if (prevProgress !== uploaderObj.progressAmount) {
console.log(Progress: ${Math.round(uploaderObj.progressAmount / uploaderObj.progressTotal * 100)}%);
prevProgress = uploaderObj.progressAmount;
}
});

uploaderObj.on('error', (error) => {
reject(error);
});

uploaderObj.on('end', () => {
if (prevProgress === 0)
console.log('Nothing to upload. Already up to date.');
resolve('Done uploading.');
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions