34
rated 0 times
[
36]
[
2]
/ answers: 1 / hits: 11752
/ 2 Years ago, tue, february 8, 2022, 12:00:00
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?
More From » reactjs