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

Very large (500mb+) file request body null #12662

Open
mrxbox98 opened this issue Sep 8, 2024 · 0 comments
Open

Very large (500mb+) file request body null #12662

mrxbox98 opened this issue Sep 8, 2024 · 0 comments

Comments

@mrxbox98
Copy link

mrxbox98 commented Sep 8, 2024

Describe the bug

The event.request.body on requests where the body is 500mb+ appears as null, even with a BODY_SIZE_LIMIT of 10gb or Infinity. I am currently trying to upload a large file using

let req = await fetch("/api/upload", {
    method: "POST",
    headers: {
        filename: file.name,
    },
    body: file,
    
});

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-uhls8v?file=src%2Froutes%2F%2Bpage.svelte

Try uploading a file ~1gb in size, it will have a reqest.body of null. Uploading a file at 504mb works for me.

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics
    Memory: 4.86 GB / 31.42 GB
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.8.0 - ~\AppData\Local\pnpm\pnpm.EXE
    bun: 1.1.21 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.2.4
    @sveltejs/adapter-node: ^5.2.2 => 5.2.2
    @sveltejs/kit: ^2.5.24 => 2.5.24
    @sveltejs/vite-plugin-svelte: ^3.1.2 => 3.1.2
    svelte: ^4.2.19 => 4.2.19
    vite: ^5.4.2 => 5.4.2

Severity

serious, but I can work around it

Additional Information

No response

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