You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
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:
@ -303,6 +303,7 @@ export async function uploadFile(
|
|||||||
progressHandler,
|
progressHandler,
|
||||||
abortController,
|
abortController,
|
||||||
includeFilename: false,
|
includeFilename: false,
|
||||||
|
type: "application/octet-stream",
|
||||||
});
|
});
|
||||||
if (abortController.signal.aborted) throw new UploadCanceledError();
|
if (abortController.signal.aborted) throw new UploadCanceledError();
|
||||||
|
|
||||||
|
@ -312,6 +312,7 @@ describe("uploadFile", () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
progressHandler,
|
progressHandler,
|
||||||
includeFilename: false,
|
includeFilename: false,
|
||||||
|
type: "application/octet-stream",
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
expect(mocked(client.uploadContent).mock.calls[0][0]).not.toBe(file);
|
expect(mocked(client.uploadContent).mock.calls[0][0]).not.toBe(file);
|
||||||
|
Reference in New Issue
Block a user