Skip to content

Commit

Permalink
fix: send correct content-type header in uploader POST (#244)
Browse files Browse the repository at this point in the history
* fix: add formData option to uploader fetch POST request

* chore: update dependencies
  • Loading branch information
dennisgsmith authored Nov 18, 2024
1 parent 1a628c0 commit 2b6823a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
45 changes: 27 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app-services/collections/uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const useUploadFile = (client: QueryClient) => {
mutationFn: ({ projectId, uploadConfigId, body }: UploadFileParams) => {
const uri = `/projects/${projectId}/uploader_configs/${uploadConfigId}/uploads`;

return apiPost(uri, body);
return apiPost(uri, body, { isFormData: true });
},
onSuccess: (_body, _, _ctx) => {
client.invalidateQueries({
Expand Down

0 comments on commit 2b6823a

Please # to comment.