diff --git a/src/models/drive-file.ts b/src/models/drive-file.ts index 183cc72ee..718e8d0dc 100644 --- a/src/models/drive-file.ts +++ b/src/models/drive-file.ts @@ -30,6 +30,7 @@ export type IMetadata = { comment: string; uri: string; deletedAt?: Date; + isExpired?: boolean; }; export type IDriveFile = { diff --git a/src/server/file/assets/cache-expired.png b/src/server/file/assets/cache-expired.png new file mode 100644 index 000000000..001e440ff --- /dev/null +++ b/src/server/file/assets/cache-expired.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de206542ee4bc582f649e685c58db78eeed15ed806349c56b285ab5cbda05140 +size 15025 diff --git a/src/server/file/send-drive-file.ts b/src/server/file/send-drive-file.ts index c6f368b41..123f5440e 100644 --- a/src/server/file/send-drive-file.ts +++ b/src/server/file/send-drive-file.ts @@ -31,7 +31,11 @@ export default async function(ctx: Koa.Context) { if (file.metadata.deletedAt) { ctx.status = 410; - await send(ctx, `${__dirname}/assets/tombstone.png`); + if (file.metadata.isExpired) { + await send(ctx, `${__dirname}/assets/cache-expired.png`); + } else { + await send(ctx, `${__dirname}/assets/tombstone.png`); + } return; }