mirror of
https://github.com/hotomoe/hotomoe
synced 2024-12-16 07:38:07 +09:00
Merge branch 'v10' of https://github.com/syuilo/misskey into v10
This commit is contained in:
commit
e8f96e848a
BIN
src/client/assets/thumbnail-not-available.png
Normal file
BIN
src/client/assets/thumbnail-not-available.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
@ -8,7 +8,7 @@ export default function(file: IDriveFile, thumbnail = false): string {
|
|||||||
|
|
||||||
if (file.metadata.withoutChunks) {
|
if (file.metadata.withoutChunks) {
|
||||||
if (thumbnail) {
|
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 {
|
} else {
|
||||||
return file.metadata.webpublicUrl || file.metadata.url;
|
return file.metadata.webpublicUrl || file.metadata.url;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ export default async function(ctx: Koa.BaseContext) {
|
|||||||
await sendRaw();
|
await sendRaw();
|
||||||
} else {
|
} else {
|
||||||
ctx.status = 404;
|
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) {
|
} else if ('web' in ctx.query) {
|
||||||
|
Loading…
Reference in New Issue
Block a user