mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 11:24:43 +00:00
fix(s3): address code review feedback on security and memory efficiency
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user