@mjackson/file-storage
Version:
Key/value storage for JavaScript File objects
17 lines • 703 B
TypeScript
import type { FileStorage, ListOptions, ListResult } from './file-storage.ts';
/**
* A simple, in-memory implementation of the `FileStorage` interface.
*
* Note: Any files you put in storage will have their entire contents buffered in memory, so this is not suitable for large files
* in production scenarios.
*/
export declare class MemoryFileStorage implements FileStorage {
#private;
get(key: string): File | null;
has(key: string): boolean;
list<T extends ListOptions>(options?: T): ListResult<T>;
put(key: string, file: File): Promise<File>;
remove(key: string): void;
set(key: string, file: File): Promise<void>;
}
//# sourceMappingURL=memory-file-storage.d.ts.map