From 47d47d42fbebee0d961cc3ed95dc461dc7500d8d Mon Sep 17 00:00:00 2001 From: dmolinari Date: Tue, 24 Feb 2026 19:17:21 -0300 Subject: [PATCH] =?UTF-8?q?Fix:=20Ajuste=20tama=C3=B1o=20de=20imagen=20y?= =?UTF-8?q?=20peso.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/ImageStorageService.cs | 6 +++--- Frontend/src/components/FormularioAviso.tsx | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Backend/MotoresArgentinosV2.Infrastructure/Services/ImageStorageService.cs b/Backend/MotoresArgentinosV2.Infrastructure/Services/ImageStorageService.cs index 8ce4a0c..08f0b9f 100644 --- a/Backend/MotoresArgentinosV2.Infrastructure/Services/ImageStorageService.cs +++ b/Backend/MotoresArgentinosV2.Infrastructure/Services/ImageStorageService.cs @@ -42,10 +42,10 @@ public class ImageStorageService : IImageStorageService throw new Exception("Formato de archivo no permitido. Solo JPG, PNG y WEBP."); } - // 2. Validación de Tamaño (Max 3MB) - if (file.Length > 3 * 1024 * 1024) + // 2. Validación de Tamaño (Max 10MB) + if (file.Length > 10 * 1024 * 1024) { - throw new Exception("El archivo excede los 3MB permitidos."); + throw new Exception("El archivo excede los 10MB permitidos."); } // 3. Validación de Magic Numbers (Leer cabecera real) diff --git a/Frontend/src/components/FormularioAviso.tsx b/Frontend/src/components/FormularioAviso.tsx index 03298d3..78de0aa 100644 --- a/Frontend/src/components/FormularioAviso.tsx +++ b/Frontend/src/components/FormularioAviso.tsx @@ -264,12 +264,12 @@ export default function FormularioAviso({ return; } - const MAX_SIZE = 3 * 1024 * 1024; + const MAX_SIZE = 10 * 1024 * 1024; const oversizedFiles = newFiles.filter((file) => file.size > MAX_SIZE); if (oversizedFiles.length > 0) { alert( - `Algunas imágenes superan el límite de 3MB:\n${oversizedFiles.map((f) => f.name).join("\n")}`, + `Algunas imágenes superan el límite de 10MB:\n${oversizedFiles.map((f) => f.name).join("\n")}`, ); return; } @@ -1179,7 +1179,7 @@ export default function FormularioAviso({ {/* 2. GESTOR DE FOTOS (Debajo) */}
-
+
@@ -1190,6 +1190,10 @@ export default function FormularioAviso({
+

+ Sugerencia: Subí fotos nítidas y horizontales para una mejor visualización. Tamaño máximo: 10 MB (Dim. Máx. 5000px x 5000px). +

+
{photos.length === 0 ? ( // ESTADO VACÍO (Grande)