Answer the question
In order to leave comments, you need to log in
POST request, postman multipart/form-data, sending an image, what's wrong?
Good afternoon.
+ I make a request via postman: form-data, specify the key (file) in the body and file type - file, select a picture 100kb, click send
how to get the properties of the picture?
console.log(req.files.file);
TypeError: Cannot read property 'file' of undefined
+ If I just write console.log(req.body) I get the image itself but I can't get its properties.
res.json({par: req.body});
{
"par": {
"------WebKitFormBoundarywGyH56j1QQEYFSe6\r\nContent-Disposition: form-data; name": "\"file\"; filename=\"pic.jpg\"\r\nContent-Type :imag................
What am I doing wrong?(
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question