Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart form parse error #4593

Closed
AxelHgt opened this issue Apr 8, 2022 · 2 comments
Closed

Multipart form parse error #4593

AxelHgt opened this issue Apr 8, 2022 · 2 comments

Comments

@AxelHgt
Copy link

AxelHgt commented Apr 8, 2022

Describe the bug

"multipart/form-data" requests throw an exception:

Multipart form parse error - Invalid boundary in multipart: None

To Reproduce

Simple multipart/form-data request:

    const data = new FormData();
    spotInfos.pictures.forEach((file, index) => {
        data.append('pictures', {
            uri: file.path, // your file path string
            name: file.name,
            type: file.type
        })
    });
    spotInfos.tags.forEach(t => data.append('tags', t))
    data.append('name', spotInfos.name);
    data.append('description', spotInfos.description);
    return axiosInstance.post(`spots/`,
        data,
        {
            headers: { 'Accept': 'application/json', 'Content-Type': 'multipart/form-data', },
        });

This code works on axios 0.24.0

Expected behavior

No error

Environment

  • Axios 0.25.0
  • React Native 0.66.4

Additional context/Screenshots

I have tested the latest version too (0.26.1)

@DigitalBrainJS
Copy link
Collaborator

Known issue: #4499, #4460, #4412, #4406
It seems this will be fixed in the next release.

@AxelHgt
Copy link
Author

AxelHgt commented Apr 9, 2022

Oh indeed, sorry !
I have only found similar issues closed automatically (because not following the template).

Thanks,
I close it because it will be fixed in the next release

@AxelHgt AxelHgt closed this as completed Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants