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

Commit

Permalink
Fixes empty content type during upload (#9848)
Browse files Browse the repository at this point in the history
* Specify exact Content-Type for encrypted uploads

* Add content type check for encrypted file upload

* Fix code style issues
  • Loading branch information
K3das authored Dec 30, 2022
1 parent b034ada commit b0dd0b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
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

0 comments on commit b0dd0b8

Please sign in to comment.