Merge pull request #779 from fabioselau077/bugfix/s3_upload_files

[v2] - Região no S3 e fix do size no uploadFile
This commit is contained in:
Davidson Gomes
2024-08-15 15:34:34 -03:00
committed by GitHub
3 changed files with 4 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ const minioClient = (() => {
useSSL: BUCKET.USE_SSL,
accessKey: BUCKET.ACCESS_KEY,
secretKey: BUCKET.SECRET_KEY,
region: BUCKET.REGION
});
}
})();

View File

@@ -1157,7 +1157,7 @@ export class BaileysStartupService extends ChannelStartupService {
const fullName = join(`${this.instance.id}`, received.key.remoteJid, mediaType, fileName);
await s3Service.uploadFile(fullName, buffer, size.fileLength, {
await s3Service.uploadFile(fullName, buffer, size.fileLength?.low, {
'Content-Type': mimetype,
});