I want to change my axios setup to upload multiple files within it
I am trying to pass it to data if the req.file
exist
But it does not work
Is there any way to access request file by req.file
What if it is defined in backend?
(Like code below)
axios({
url: URL + req.url,
method: req.method,
...(
(!req.file)
? { data: req.body }
: { data: req.file }
),
})