Closed pbalan closed 2 years ago
One callout here. get
method returns the object instead of buffer.
Am using it as below.
import { Storage } from '@squareboat/nest-storage';
..
..
..
const storage = Storage.disk('images');
const fp = join(
__dirname,
'..',
'..',
'src',
'shared',
'images',
'Hotel-2.jpeg',
);
const image = await storage.get('test.jpeg');
const res = image as unknown as any;
const resp = await fs.writeFile(await fp, res.res?.data);
(await fp).close();
Hi @vinayak25 ,
Firstly, thanks for creating a great module. This is really helpful for switching the storage on the fly.
I'd like to contribute to your project. Please kindly help review the code and help publish this through npm.
Thanks!