feat(billing): cap each owner's stored file volume

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-02 15:44:36 +03:30
co-authored by Cursor
parent e6e90aabf3
commit 28938e8f77
20 changed files with 647 additions and 22 deletions
@@ -32,6 +32,15 @@ export class LocalFileStorage implements OnModuleInit {
await fs.writeFile(abs, buffer);
}
async sizeOf(storageKey: string): Promise<number> {
try {
const stat = await fs.stat(this.absolutePath(storageKey));
return stat.size;
} catch {
return 0;
}
}
async remove(storageKey: string): Promise<void> {
const abs = this.absolutePath(storageKey);
try {