Fixes empty content type during upload (#9848)

* Specify exact Content-Type for encrypted uploads

* Add content type check for encrypted file upload

* Fix code style issues
This commit is contained in:
Kedas 2022-12-30 00:34:38 -08:00 committed by GitHub
parent b034ada6fd
commit b0dd0b8aef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -303,6 +303,7 @@ export async function uploadFile(
progressHandler,
abortController,
includeFilename: false,
type: "application/octet-stream",
});
if (abortController.signal.aborted) throw new UploadCanceledError();

View File

@ -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);