mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
improve media mime type inferring + added uploadToEntity in media api
This commit is contained in:
@@ -207,7 +207,7 @@ export async function blobToFile(
|
||||
if (isFile(blob)) return blob;
|
||||
if (!isBlob(blob)) throw new Error("Not a Blob");
|
||||
|
||||
const type = !isMimeType(overrides.type, ["application/octet-stream"])
|
||||
const type = isMimeType(overrides.type, ["application/octet-stream"])
|
||||
? overrides.type
|
||||
: await detectMimeType(blob);
|
||||
const ext = type ? extension(type) : "";
|
||||
|
||||
Reference in New Issue
Block a user