I am uploading file in react using axios.
when I am doing
alert(values.attachedFile[0]);
but when I am sending values.attachedFile[0] in axios post request enpty thing is going.
const { result } = await axios.post(app.resourceServerUrl + '/file/upload', {
data: values.attachedFile[0],
headers: {
'Content-Type': 'multipart/form-data',
},
});
but as part of request is is going empty.
what mistake I am doing?


file/upload