import { Serde } from "@daiso-tech/core/serde";
import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/super-json-serde-adapter"
import { FileStorag } from "@daiso-tech/core/file-storage";
import { FsFileStorageAdapter } from "@daiso-tech/core/file-storage/fs-file-storage-adapter";
const serde = new Serde(new SuperJsonSerdeAdapter());
const fileStorageAdapter = new FsFileStorageAdapter();
const fileStorage = new FileStorage({
serde,
adapter: fileStorageAdapter,
})
FileStorageclass can be derived from anyIFileStorageAdapter.Note the
IFileinstances created by theFileStorageclass are serializable and deserializable, allowing them to be seamlessly transferred across different servers, processes, and databases. This can be done directly usingISerderRegisteror indirectly through components that rely onISerderRegisterinternally.IMPORT_PATH:
"@daiso-tech/core/file-storage"