AWS S3 的飞行存储适配器
这个软件包包含使用V3 SDK的AWS S3的Flystorage适配器.
安装
安装所有需要的软件包
npm install --save @flystorage/file-storage @flystorage/aws-s3 @aws-sdk/client-s3
使用量
import {FileStorage} from '@flystorage/file-storage';
import {AwsS3StorageAdapter} from '@flystorage/aws-s3';
import {S3Client} from '@aws-sdk/client-s3';
const client = new S3Client();
const adapter = new AwsS3StorageAdapter(client, {
bucket: '{your-bucket-name}',
prefix: '{optional-path-prefix}',
});
const storage = new FileStorage(adapter);
QQ 总是使用 FileStorage, 它对于安全和良好的开发者至关重要 经历。 不直接使用适配器.