Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

FormData is not defined #94

Open
krishna-777 opened this issue Jun 22, 2021 · 0 comments
Open

FormData is not defined #94

krishna-777 opened this issue Jun 22, 2021 · 0 comments

Comments

@krishna-777
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant