Firefox multipart/form‑data upload stalls (0 bytes sent) to Next.js pages/api endpoint — works in Edge/Chromium

Summary: Uploading a file to a custom webapp with Chromium (Edge) works but consistently fails in Firefox. In Firefox the request is created, and times out. The server re… (read more)

Summary: Uploading a file to a custom webapp with Chromium (Edge) works but consistently fails in Firefox. In Firefox the request is created, and times out. The server receives no file and logs “missing file.” The same webapp code is running on both Chromium and Firefox.

Environment:

  • Next.js app (pages/api route)
  • Endpoint: POST /api/file-upload
  • Client: fetch(url, { method: "POST", body: FormData, credentials: "include" })
  • Server: export const config = { api: { bodyParser: false } } + multipart parsing (formidable)
  • Edge/Chromium: Version 141.0.3537.85
  • Firefox Version 147.0.3 (64-bit)
  • OS: Ubuntu 22 / Linux

Steps to reproduce:

  1. Create a FormData object and append a local file:
  const fd = new FormData();
  fd.append("template", file, file.name);
  fetch(`/api/file-upload`, {
    method: "POST",
    body: fd,
  1. In Edge/Chrome, upload succeeds. Server receives multipart body and parses the file. Actual behavior in Firefox:
  • Transferred: 0 B
  • No response status/body
  • Client times out (Upload times out)
  • File upload request received
  • No bytes read server‑side.

Evidence:

  • Edge request logs:
    • content-type: multipart/form-data; boundary=----WebKitFormBoundary...
    • bytesRead ~1.69MB
  • Firefox request logs:
    • Transferred 0 B
    • File upload missing file field

Notes:

  • Client FormData is valid; we log file.name and file.size right before fetch.
  • There is a CSP report‑only warning (frame‑ancestors) when using a fallback iframe approach, but we are not using iframe in the failing case.

Question: Is there a known issue where Firefox blocks or fails to send and multipart/body can be stripped before it leaves the browser? Is there a recommended workaround that does not rely on browser sniffing?

Moderator note: This question has been edited to correct the formatting.

Asked by Jeff R 1 day ago

Last reply by Denys 1 day ago

баг браузер не реагирует на ввод текста

После включения ПК бывает, что я не могу ввести текст в браузере.(как буд-то включается режим только для чтения, что не позволяет текст ввести). горячие клавиши работают,… (read more)

После включения ПК бывает, что я не могу ввести текст в браузере.(как буд-то включается режим только для чтения, что не позволяет текст ввести). горячие клавиши работают, но текст не вводиться только в браузере. Оно само по себе проходит. Как это исправить?

Asked by Vladoodle 1 day ago

Last reply by Denys 1 day ago

Search open tabs in vertical tab layout

Hi, Since the search open tabs function is part of the overflow button in a horizontal tab layout, when you switch to vertical tabs, you lose that search function. Is the… (read more)

Hi, Since the search open tabs function is part of the overflow button in a horizontal tab layout, when you switch to vertical tabs, you lose that search function. Is there a way to add it to my vertical tab layout? Thanks, Scott

Asked by Scott 3 months ago

Last reply by Derek Williams 1 day ago

Installation of Firefox latest browser

I seem to be unable to install Firefox on my Windows 11 desktop because there is apparently an old version already on my computer. I wish to reinstall Firefox with your h… (read more)

I seem to be unable to install Firefox on my Windows 11 desktop because there is apparently an old version already on my computer. I wish to reinstall Firefox with your help

Asked by John Smith 2 days ago

Last reply by Denys 1 day ago

not sound

Неожиданно пропал звук при использовании любых видеосервисов из Интернета.. При использовании других браузеров звук рабоет нормально. Как решить проблему с восстановлени… (read more)

Неожиданно пропал звук при использовании любых видеосервисов из Интернета.. При использовании других браузеров звук рабоет нормально. Как решить проблему с восстановлением звука?

I've suddenly lost sound while using any online video services. Sound works fine when using other browsers. How can I restore sound?

Asked by bbtokyo 1 day ago

Last reply by Denys 1 day ago

Apple Icloud stopped loading on firefox browser

Hello, I use a shortcut link in my book marks bar to access my apple email account throughout the day on my mac. Apparently my firefox browser was set to auto-update and… (read more)

Hello, I use a shortcut link in my book marks bar to access my apple email account throughout the day on my mac. Apparently my firefox browser was set to auto-update and the new update today has presented some problems. None of my icloud apps are loading either using the updated browser.

Asked by sarahsviolets 1 day ago

Last reply by Denys 1 day ago

Adress bar

How to remove google search from the address bar on the right????? I want to find my most visited websites in the address bar without any unnecessary actions!!! … (read more)

How to remove google search from the address bar on the right?????

I want to find my most visited websites in the address bar without any unnecessary actions!!!

Asked by raivis.kurcins 6 days ago

Last reply by solvingpuzzles 1 day ago

Profiles -

Hi, When I opened Firefox today, it asked me which profile I'd like to use. I named one Katy and then continued. Now, I can't see any of my bookmarks, none of my passwo… (read more)

Hi,

When I opened Firefox today, it asked me which profile I'd like to use. I named one Katy and then continued. Now, I can't see any of my bookmarks, none of my passwords are saved, none of my sites recognized. I've been using Firefox for years. Everything I have is saved there. I just want my old stuff back. I'm signed in on my account, but can't see another profile that I can choose. My phone still has all the passwords and bookmarks from before but I I can't see what profile I'm signed in under. Can anyone help?

Thank you!


Katy

Asked by Katylnicholson 3 days ago

Last reply by AliceWyman 1 day ago