feat: clean unused images only after 24hrs (local-only) (#5839)

* feat: clean unused images only after 24hrs (local-only)

* fix test

* make optional for now
This commit is contained in:
David Luzar 2022-11-06 19:41:14 +01:00 committed by GitHub
parent 938ce241ff
commit b91158198e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 8 deletions

View file

@ -61,7 +61,18 @@ export type BinaryFileData = {
| typeof MIME_TYPES.binary;
id: FileId;
dataURL: DataURL;
/**
* Epoch timestamp in milliseconds
*/
created: number;
/**
* Indicates when the file was last retrieved from storage to be loaded
* onto the scene. We use this flag to determine whether to delete unused
* files from storage.
*
* Epoch timestamp in milliseconds.
*/
lastRetrieved?: number;
};
export type BinaryFileMetadata = Omit<BinaryFileData, "dataURL">;