Files
server/cdn/src/util/Storage.ts
T
Flam3rboy 512375f6ed cdn
2021-08-12 20:16:45 +02:00

16 lines
330 B
TypeScript

import { FileStorage } from "./FileStorage";
export interface Storage {
set(path: string, data: Buffer): Promise<void>;
get(path: string): Promise<Buffer | null>;
delete(path: string): Promise<void>;
}
var storage: Storage;
if (process.env.STORAGE_PROVIDER === "file") {
storage = new FileStorage();
}
export { storage };