How to destructure File object

I have an in request with the ‘body’ parameter. I got the below body object when I did the console.log(req.body). I want to destructure or consume the File for further processing/upload.

the request is formed with below

formData = new FormData();
formData.append("files", file) //file is of type File, and will be attached from browser

How do I get the filename and buffer of the file from the below object?

 body: [Object: null prototype] {
    files: '[object File]',
    userName: 'TestUser'

I tried


out put

[object File]

How to destructure this File further to get details about it

136 thoughts on “How to destructure File object”

  1. i need a loan long term, i need a loan now with bad credit. i need more loan money for college i need loan i own my home outright and need a loan i need a loan my credit is bad, best cash advance loans yahoo answers, cash advance online, cash advances, payday advance loans without bank account. Money management will spark economics, terms of credit.


Leave a Comment