diff --git a/src/client/assets/thumbnail-not-available.png b/src/client/assets/thumbnail-not-available.png new file mode 100644 index 000000000..ba489c62e --- /dev/null +++ b/src/client/assets/thumbnail-not-available.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65f5b8de0f28a495ef8acb35ec067275ce5f641694617ecc9a72bd0bdbc983f8 +size 5705 diff --git a/src/misc/get-drive-file-url.ts b/src/misc/get-drive-file-url.ts index 067db8a5d..f2b0f8b00 100644 --- a/src/misc/get-drive-file-url.ts +++ b/src/misc/get-drive-file-url.ts @@ -8,7 +8,7 @@ export default function(file: IDriveFile, thumbnail = false): string { if (file.metadata.withoutChunks) { if (thumbnail) { - return file.metadata.thumbnailUrl || file.metadata.webpublicUrl || (isImage ? file.metadata.url : null); + return file.metadata.thumbnailUrl || file.metadata.webpublicUrl || (isImage ? file.metadata.url : '/assets/thumbnail-not-available.png'); } else { return file.metadata.webpublicUrl || file.metadata.url; } diff --git a/src/server/file/send-drive-file.ts b/src/server/file/send-drive-file.ts index e0208f3fa..b22124240 100644 --- a/src/server/file/send-drive-file.ts +++ b/src/server/file/send-drive-file.ts @@ -73,7 +73,7 @@ export default async function(ctx: Koa.BaseContext) { await sendRaw(); } else { ctx.status = 404; - await send(ctx as any, '/dummy.png', { root: assets }); + await send(ctx as any, '/thumbnail-not-available.png', { root: assets }); } } } else if ('web' in ctx.query) {