Generate video thumbnails (#4084)
* Generate video thumbnails * import order
This commit is contained in:
parent
170b1bb4cc
commit
3040700005
7 changed files with 51 additions and 4 deletions
|
@ -64,7 +64,12 @@ export default async function(ctx: Koa.BaseContext) {
|
|||
const bucket = await getDriveFileThumbnailBucket();
|
||||
ctx.body = bucket.openDownloadStream(thumb._id);
|
||||
} else {
|
||||
await sendRaw();
|
||||
if (file.contentType.startsWith('image/')) {
|
||||
await sendRaw();
|
||||
} else {
|
||||
ctx.status = 404;
|
||||
await send(ctx as any, '/dummy.png', { root: assets });
|
||||
}
|
||||
}
|
||||
} else if ('web' in ctx.query) {
|
||||
const web = await DriveFileWebpublic.findOne({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue