1 year ago

#362238

test-img

Irfan wani

axios giving this error after updated to latest version; Multipart form parse error - Invalid boundary in multipart: None

I know there are many questions regarding this on stackoverflow but none of them is answered well (atleast for me).

So, I am using axios (in react native) to send form data to backend (using drf there).

everything was working fine until i upgraded axios to latest version (0.26.1).

Now when i sent the data, it shows the following error;

Multipart form parse error - Invalid boundary in multipart: None

Here is the config object for axios;

    const config = {
        headers: {
            "Content-Type": "multipart/form-data",
        },
    };

After searching on internet, i found that i need to provide some boundary, but i am not understanding why and how to do so.

Please explain the solution if you have one.

Thanks!

react-native

axios

http-post

multipart

form-data

0 Answers

Your Answer

Accepted video resources