« first day (3820 days earlier)      last day (297 days later) » 

20:50
Hello
I have an express application and my current end goal is to submit files to amazon S3 bucket, and my code looks like this:

const fileName = req.files.file.name
const fileContent = req.files.file.data
const fileType = req.files.file.mimetype

// Setting up S3 upload parameters
const params = {
Bucket: bucket,
Key: fileName,
Body: fileContent,
ACL: "public-read"
};

// Uploading files to the bucket
s3.upload(params, function(err, data) {
if (err) {
console.log(err.message)
throw err;
}
console.log(`File uploaded successfully. ${data.key} ${data.Key} ${data.ETag}`);
1 message moved from JavaScript

« first day (3820 days earlier)      last day (297 days later) »