fix: increase upload limit to 15MB and fix infinite loading with S3 timeouts
This commit is contained in:
@@ -15,6 +15,8 @@ console.log(`[S3/MinIO] Configurando cliente: ${endpointUrl} (SSL: ${useSSL})`);
|
||||
|
||||
export const bucketName = process.env.S3_BUCKET_NAME || process.env.MINIO_BUCKET_NAME || 'occto-images';
|
||||
|
||||
import { NodeHttpHandler } from '@smithy/node-http-handler';
|
||||
|
||||
export const s3Client = new S3Client({
|
||||
region: 'us-east-1',
|
||||
endpoint: endpointUrl,
|
||||
@@ -23,6 +25,10 @@ export const s3Client = new S3Client({
|
||||
accessKeyId: process.env.S3_ACCESS_KEY || process.env.MINIO_ACCESS_KEY || 'admin',
|
||||
secretAccessKey: process.env.S3_SECRET_KEY || process.env.MINIO_SECRET_KEY || 'adminpassword',
|
||||
},
|
||||
requestHandler: new NodeHttpHandler({
|
||||
connectionTimeout: 10000, // 10 segundos
|
||||
socketTimeout: 10000, // 10 segundos
|
||||
}),
|
||||
});
|
||||
|
||||
type MetadataMap = Record<string, string> | undefined;
|
||||
|
||||
Reference in New Issue
Block a user