Fausto95/aws-s3

FormData is not defined

Opened this issue · 0 comments

My code is,

const S3Client = new S3(config)
const image = await req.files.profile_picture
const imageName = uuid.v4() + 'user_profile'
const upload = S3Client.uploadFile(image, imageName).then((response)=>{
console.log(response)
}).catch( (err) =>{
console.log(err)
})

I got the error like in console :
ReferenceError: FormData is not defined
at s.uploadFile (../app-cms/server/node_modules/aws-s3/dist/aws-s3.js:1:1591)

Please Define the FromData in the S3Client file. I saw the GitHub code and it's really not defined. I used strict mode on and Eslint so I can't move further with this error