I am trying to upload images to AWS but because of the Migrating to the new build system it is not working anymore
import { Upload } from "@aws-sdk/lib-storage";
import { S3Client } from "@aws-sdk/client-s3";
const parallelUploads3 = new Upload({
client: new S3Client({}),
params: { Bucket, Key, Body },
});
parallelUploads3.on("httpUploadProgress", (progress) => {
console.log(progress);
});
parallelUploads3.done().then(
(data) => {
console.log(data)
},
(err: any) => {
console.log(err)
},
);
and i get this Error
TypeError: Cannot read properties of undefined (reading 'done')
at getChunkStream.js:5:5
at Generator.next (<anonymous>)
at resume (chunk-CDW57LCT.js?v=b9e9dd30:100:27)
at chunk-CDW57LCT.js?v=b9e9dd30:106:63
at new ZoneAwarePromise (zone.js:1425:21)
at it.<computed> [as next] (chunk-CDW57LCT.js?v=b9e9dd30:106:38)
at Upload.<anonymous> (Upload.js:130:9)
at Generator.next (<anonymous>)
at chunk-CDW57LCT.js?v=b9e9dd30:90:61
at new ZoneAwarePromise (zone.js:1425:21)
I expect the Migrating should have no effect on the app
New contributor
Mohamed Zakaria is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.