Closed enstyled closed 4 months ago
This should be easy if you just extend the IImageInterface
import { IImageStorage } from "../services/image-storage.service";
export class FileStorageProvider implements IImageStorage {
constructor(private readonly logger: LoggerService) {}
public fetchImage(imageId: string): Promise<null> {
// use node fs api to retrieve image
}
public storeImage(imageId: string, image: Buffer): Promise<null> {
// use node fs api to store image
}
}
I would be happy to merge a PR with this support.
Thank you so much for looking into this and adding it so fast 😊❤️
A great addition would be the option for caching the results locally, as it would be always faster and more secure than external services like S3 and CouchDB.