We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was trying to create a zip and upload it to the s3 bucket using v3 sdk.
const zip = new JSZip(); fileArr.forEach((file: string) => { zip.folder("./")?.file(file, fs.readFileSync(path.join(reportDir, file))); }); const content: NodeJS.ReadableStream = zip.generateNodeStream({ type: "nodebuffer", streamFiles: true }); try { const uploadCommand = new PutObjectCommand({ Bucket: config.S3_REPORT_DOWNLOAD_BUCKET, Key: zipFile, Body: content }); data = await s3ClientUpload.send(uploadCommand); console.log("ZIP file uploaded to S3"); } catch (error) { console.log(error); }
Here we are using content in the Body parameter of PutObjectCommand but it fails to recognize the readstream.
content
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was trying to create a zip and upload it to the s3 bucket using v3 sdk.
Here we are using
content
in the Body parameter of PutObjectCommand but it fails to recognize the readstream.The text was updated successfully, but these errors were encountered: