跳到主要内容

Storage

此接口存储由 BulkWriter 生成的文件。您可以使用它在调用 bulkInsert() 之前,将生成的文件上传到对象存储或其他远程位置。

typescript
interface Storage

方法:

  • write(localPath: string, remotePath: string): Promise<string>

    存储生成的本地文件,并返回应传递给 Milvus 导入 API 的最终路径。

示例

javascript
class S3Storage {
async write(localPath, remotePath) {
await uploadToS3(localPath, remotePath);
return `s3://bucket/${remotePath}`;
}
}
最低 SDK 版本v2.6.12
Ctrl I