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

After upgrading to tar-fs 3.0.6 from 2.1.1, getting unexpected end of multipart data #110

Open
johndevedu opened this issue Sep 3, 2024 · 0 comments

Comments

@johndevedu
Copy link

johndevedu commented Sep 3, 2024

We're using the pack functionality, and uploading via mutipart/form-data. When we downgrade to 2.1.1, it starts working again. I was looking back at tar-fs 2 -> 3 changes, and noticed one of the major changes was tar-stream. When I use npm override to go back to tar-stream@2.1.4 along with tar-fs@3.0.6, that also works. So I'm thinking it has something to do with tar-stream bump but not sure.

const pack = tar.pack('./', {
      entries: [...],
      finalize: true
    });

const fd = new FormData();
fd.append('file', pack, { filename: "tarballFileName.tar" });

const axiosOptions = {
    method: 'post',
    url: "http://localhost:9090/upload",
    data: fd,
    headers: {
        'Content-Type': `multipart/form-data; boundary=${fd.getBoundary()}`
      },
};

await axios({
    ...axiosOptions
});

Any ideas what could cause it to break?

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

1 participant