mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(core): allow unused blobs to preview in new tab (#10874)
fix AF-2330
This commit is contained in:
@@ -159,8 +159,8 @@ export class UnusedBlobs extends Entity {
|
||||
return null;
|
||||
}
|
||||
|
||||
const url = URL.createObjectURL(new Blob([blob]));
|
||||
const mime = record.mime || fileType?.mime || 'unknown';
|
||||
const url = URL.createObjectURL(new Blob([blob], { type: mime }));
|
||||
// todo(@pengx17): the following may not be sufficient
|
||||
const extension = fileType?.ext;
|
||||
const type = extension ?? (mime?.startsWith('text/') ? 'txt' : 'unknown');
|
||||
|
||||
Reference in New Issue
Block a user