mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 19:34:38 +00:00
fix(s3): ensure downloadToFile uses Bun.write for streaming
This commit is contained in:
@@ -125,8 +125,7 @@ export class S3StorageService implements S3Service {
|
||||
|
||||
async downloadToFile(bucket: string, key: string, filePath: string): Promise<void> {
|
||||
const file = this.client.file(key, { bucket })
|
||||
const arrayBuffer = await file.arrayBuffer()
|
||||
await fs.promises.writeFile(filePath, Buffer.from(arrayBuffer))
|
||||
await Bun.write(filePath, file)
|
||||
}
|
||||
|
||||
async deleteObject(bucket: string, key: string): Promise<number> {
|
||||
|
||||
Reference in New Issue
Block a user