Web: https://www.reddit.com/r/aws/comments/s35qqs/uploading_wav_file_within_formdata_to_s3/

Jan. 13, 2022, 6:14 p.m. | /u/rushimanche

Amazon Web Services (AWS): S3, EC2, SQS, RDS, DynamoDB, IAM, CloudFormation, Route 53, VPC and more reddit.com

Hello,

I have the code below that uploads files to s3. The file I want to upload is a wav file that is passed from frontend to backend in FormData. The value of data is:

 { fieldname: 'wavfile', originalname: '401.wav', encoding: '7bit', mimetype: 'application/octet-stream', destination: 'uploads/', filename: '3d8b0ed561976a9564177af7d0a58b65', path: 'uploads/3d8b0ed561976a9564177af7d0a58b65', size: 435268 } 

when I try to put an object to s3, I use this code:

 const params = { ACL: 'public-read', Body: data, Bucket: S3_BUCKET, Key: data.originalname }; const myBucket = new AWS.S3({ params: { Bucket: …

aws s3

DevOps Software Engineer

@ Sinch | Malmö, Skåne County, Sweden

Senior Staff Engineer, Cloud Systems

@ Life360 | Remote, USA

Junior DevOps Engineer

@ SmartBear | Wrocław, Lower Silesian Voivodeship, Poland

Senior DevOps Engineer - Data Engineering

@ Life360 | Ukraine

DevOps Engineer , Team Lead ( Remote )

@ AssistRx | Remote - Orlando, Florida, United States

Senior DevSecOps

@ Prodigy Education | Oakville, Ontario