This commit is contained in:
archer
2025-12-09 18:25:36 +08:00
parent c50622b469
commit 4ef20c81ef

View File

@@ -112,7 +112,7 @@ export class S3ChatSource {
return this.bucket.addDeleteJob({ key });
}
async uploadFile(params: UploadFileParams) {
async uploadFileByBuffer(params: UploadFileParams) {
const { appId, chatId, uId, filename, expiredTime, buffer, contentType } =
UploadChatFileSchema.parse(params);
const { fileKey } = getFileS3Key.chat({
@@ -122,7 +122,6 @@ export class S3ChatSource {
filename
});
console.log('upload to s3, contentType:', contentType);
await this.bucket.putObject(fileKey, buffer, undefined, {
'Content-Type': contentType || 'application/octet-stream'
});