Skip to content

Commit

Permalink
Don't set content type header explicitly while sending data to the se…
Browse files Browse the repository at this point in the history
…rver.
  • Loading branch information
Kapelianovych committed Jan 15, 2025
1 parent 10e57ca commit 57ae3e4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { createId } from "../id";
import { Reference } from "../entities/entity";
import { EstimateRange } from "../entities/estimate";
import { calculateEstimates } from "../store/selectors";
Expand Down Expand Up @@ -65,7 +64,9 @@ export async function sendProjectEstimatesAndAccompanyingData(
{
method: "POST",
headers: {
"Content-Type": "multipart/form-data; boundary=" + createId(),
// Don't do this. Just don't.
// https://muffinman.io/blog/uploading-files-using-fetch-multipart-form-data/
// "Content-Type": "multipart/form-data; boundary=" + crypto.generateUUID(),
},
body,
},
Expand Down

0 comments on commit 57ae3e4

Please sign in to comment.