mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-18 13:06:32 -06:00
set region from env and fix size in uploadFile
This commit is contained in:
parent
376cafa350
commit
b475d1d5ea
@ -21,6 +21,7 @@ const minioClient = (() => {
|
||||
useSSL: BUCKET.USE_SSL,
|
||||
accessKey: BUCKET.ACCESS_KEY,
|
||||
secretKey: BUCKET.SECRET_KEY,
|
||||
region: BUCKET.REGION
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
@ -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,
|
||||
});
|
||||
|
||||
|
@ -202,6 +202,7 @@ export type S3 = {
|
||||
ENABLE: boolean;
|
||||
PORT?: number;
|
||||
USE_SSL?: boolean;
|
||||
REGION?: string;
|
||||
};
|
||||
|
||||
export type CacheConf = { REDIS: CacheConfRedis; LOCAL: CacheConfLocal };
|
||||
@ -463,6 +464,7 @@ export class ConfigService {
|
||||
ENABLE: process.env?.S3_ENABLED === 'true',
|
||||
PORT: Number.parseInt(process.env?.S3_PORT || '9000'),
|
||||
USE_SSL: process.env?.S3_USE_SSL === 'true',
|
||||
REGION: process.env?.S3_REGION
|
||||
},
|
||||
AUTHENTICATION: {
|
||||
API_KEY: {
|
||||
|
Loading…
Reference in New Issue
Block a user