fix: increase upload limit to 15MB and fix infinite loading with S3 timeouts

This commit is contained in:
Erik
2026-03-09 20:14:35 -03:00
parent 4f27f501b9
commit 6cd5d490de
4 changed files with 72 additions and 56 deletions

View File

@@ -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;