Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fixes empty content type during upload #9848

Merged
merged 3 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ContentMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ export async function uploadFile(
progressHandler,
abortController,
includeFilename: false,
type: "application/octet-stream"
});
if (abortController.signal.aborted) throw new UploadCanceledError();

Expand Down
1 change: 1 addition & 0 deletions test/ContentMessages-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ describe("uploadFile", () => {
expect.objectContaining({
progressHandler,
includeFilename: false,
type: "application/octet-stream"
}),
);
expect(mocked(client.uploadContent).mock.calls[0][0]).not.toBe(file);
Expand Down