Resolve external embed previews and keep their real MIME types
This commit is contained in:
+3
-2
@@ -394,9 +394,10 @@ export class MediaService {
|
||||
const item = this.getMediaItem(scrapeId, itemId);
|
||||
if (!item?.preview_hash) return null;
|
||||
|
||||
const extension = item.preview_ext ?? "webp";
|
||||
return {
|
||||
path: join(this.rootDir, scrapeId, "thumbs", `${item.preview_hash}.webp`),
|
||||
contentType: "image/webp"
|
||||
path: join(this.rootDir, scrapeId, "thumbs", `${item.preview_hash}.${extension}`),
|
||||
contentType: FILE_CONTENT_TYPES[extension] ?? "application/octet-stream"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user