リモートサーバーのファイルをデータベースに保存せず、クライアントで直接表示させられるように
This commit is contained in:
parent
e804757d83
commit
558b897700
10 changed files with 110 additions and 60 deletions
|
@ -33,11 +33,12 @@ export default async function(ctx: Koa.Context) {
|
|||
|
||||
if (file.metadata.deletedAt) {
|
||||
ctx.status = 410;
|
||||
if (file.metadata.isExpired) {
|
||||
await send(ctx, '/cache-expired.png', { root: assets });
|
||||
} else {
|
||||
await send(ctx, '/tombstone.png', { root: assets });
|
||||
}
|
||||
await send(ctx, '/tombstone.png', { root: assets });
|
||||
return;
|
||||
}
|
||||
|
||||
if (file.metadata.isMetaOnly) {
|
||||
ctx.status = 204;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue