tombstone
This commit is contained in:
parent
0f67a544bd
commit
1b8acb7e01
|
@ -29,6 +29,7 @@ export type IMetadata = {
|
||||||
folderId: mongo.ObjectID;
|
folderId: mongo.ObjectID;
|
||||||
comment: string;
|
comment: string;
|
||||||
uri: string;
|
uri: string;
|
||||||
|
deletedAt?: Date;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IDriveFile = {
|
export type IDriveFile = {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
|
@ -22,6 +22,12 @@ export default async function(ctx: Koa.Context) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file.metadata.deletedAt) {
|
||||||
|
ctx.status = 410;
|
||||||
|
await send(ctx, `${__dirname}/assets/tombstone.png`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const bucket = await getGridFSBucket();
|
const bucket = await getGridFSBucket();
|
||||||
|
|
||||||
const readable = bucket.openDownloadStream(fileId);
|
const readable = bucket.openDownloadStream(fileId);
|
||||||
|
|
Loading…
Reference in New Issue