snippets-web
snippets-web copied to clipboard
Implement missing multipart/form-data handling in auth-next's service-worker-sessions.
trafficstars
What steps will reproduce the problem:
- Start the service worker session in the auth-next snippet.
- Attempt to upload a file using a form with enctype="multipart/form-data".
- Observe that the session does not handle the multipart/form-data POST request correctly.
What is the expected result?
The service worker session should correctly handle multipart/form-data encoded forms, parsing the file input and passing it along to the server without issues.
What happens instead of that?
The service worker cannot process the multipart/form-data content type and returns buffer information in the body as text data.
The file upload succeeds, but the file is corrupted due to this.