multivendor-storage
v0.0.1
Published
Framework-agnostic S3 and GCP storage clients with public URL helpers
Maintainers
Readme
multivendor-storage
Framework-agnostic S3 and Google Cloud Storage clients with public URL helpers.
Install
npm install multivendor-storageUsage
import { S3StorageClient, GcpStorageClient, buildPublicUploadUrl } from 'multivendor-storage';
const s3 = new S3StorageClient({
region: 'ap-south-1',
bucket: 'my-bucket',
});
await s3.putObject('products/photo.jpg', buffer, 'image/jpeg');
const url = buildPublicUploadUrl('products/photo.jpg', {
provider: 's3',
bucket: 'my-bucket',
region: 'ap-south-1',
});License
MIT
