I have a problem with API. This is my code
onSubmit={async (values) => {
const jsonData = {
...values,
address: JSON.stringify(values.address),
products: JSON.stringify(values.products),
};
let fileData = new FormData();
fileData.append("file", values.file[0]);
await axios.post("https://nehra.az/api/add-supplier", jsonData, fileData);
}}
Api does not read the second parameter and my result is this

if I change jsonData with fileData, the jsonData is not read. Like this
await axios.post("https://nehra.az/api/add-supplier", fileData, jsonData);
How can I solve this problem? I need that API must be work with two parameter. Thank you