i want to inser data with image in react using axios but i hve problem
const useInsertDataWithImage = async (url, params) => {
const config = {
headers: { 'Content-Type': 'multipart/form-data' },
Authorization: `Bearer ${localStorage.getItem('token')}`,
};
const res = await baseURL.post(url, params, config);
console.log(res);
return res.data;
};
here is my function
token is valid and it gives me
status:”Authorization Token not Found”
note it work in postman
i tried to mege url with params to pass only config but i cannot did it