question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

multipart/form-data The connection was reset

See original GitHub issue

I’m trying to upload files with fresh so i put this form into a pages :

export default function Audiobook() {
  return (
    <div>
      <h1>Upload audioboks</h1>

      <form
        encType="multipart/form-data"
        action="/api/audiobooks/"
        method="post"
      >
        <div>
          <label for="author">Author:</label>
          <input type="text" name="author" />
        </div>
        <div>
          <label for="book-name">Book name:</label>
          <input type="text" name="book-name" />
        </div>
        <div>
          <label for="chapter-name">Chapter name:</label>
          <input type="text" name="chapter-name" />
        </div>
        <div>
          <label for="audio">Audio file:</label>
          <input type="file" name="audio" accept="audio/*" />
        </div>

        <input type="submit" value="upload" />
      </form>
    </div>
  );
}

/api/audiobooks/ looks like this :

export const handler = async (
  _req: Request,
  _ctx: HandlerContext,
): Promise<Response> => {
  return new Response("Audiobooks !");
};

and when i send the form i got

The connection was reset

The connection to the server was reset while the page was loading.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer’s network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Does multipart/form-data supported by fresh ? if yes how can i get it working ? any examples ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lucacasonatocommented, Jun 26, 2022

Would you mind creating a little demo project so I can reproduce the issue?

0reactions
Kleakcommented, Jun 28, 2022

I found the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connection was reset when submitting a multipart form in ...
The connection was reset The connection to the server was reset while the page was loading. These are some of the parameters on...
Read more >
Connection reset message on redirecting multipart/form-data ...
'sendRedirect' works fine if it is normal request. But not in case of multipart/formdata request. We get an "The connection to the server...
Read more >
There is a problem when upload a big file · Issue #2271 - GitHub
The server you're sending the data to timed out and closed the connection. This isn't anything wrong with Retrofit. You either need to...
Read more >
PR_CONNECT_RESET_ERROR when sending POST ...
The connection was reset. Try: Checking the connection; Checking the proxy and the firewall; [Running Windows Network Diagnostics](javascript: ...
Read more >
Application Firewall Resetting Connections for POST Requests
... and thus, NetScaler reset the connection. The malformed portion of the POST from the client is the following line: Content-Type: multipart/form-data, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found