FirebaseExtended / FirebaseExtended/firebase-auth-service-worker-sessions

Override Request for POST Multipart form

Open
#22 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
90
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hi

I m just stuck when i use the service worker using a POST request with a formData (jquery) to send a simple file to the java backend.
It seems the ``` return req.text(); ``` of the body file (with all the boudary wrapper etc...) is modified (or corrupted) because on the backend the Multipart REST catch the file but can not make anything with it .

I try to test req.formData() insteadOf req.text() but nothing relevant.

**Without** using the service worker, (meaning no service worker on browser) everything work.
So the $ajax post is valid, and Rest WS too.

Maybe someone could help please ?

Feel free to comment any idea :-)

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by reproducing the jQuery POST with FormData through the service worker, then compare the request body with the direct request; done means the Java multipart endpoint receives a usable file in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, jquery
Domain
backend-api-design, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.