fix(s3): address code review feedback on security and memory efficiency

This commit is contained in:
yiling
2026-06-08 20:00:48 +08:00
parent 3fe0b3490d
commit 38909b2bab
2 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -199,8 +199,7 @@ export class S3StorageService implements S3Service {
}
async uploadFileToKey(filePath: string, key: string, contentType: string): Promise<void> {
const fileContent = readFileSync(filePath)
await this.client.write(key, fileContent, {
await this.client.write(key, Bun.file(filePath), {
bucket: this.bucket,
type: contentType,
})