Fix: Ajuste tamaño de imagen y peso.

This commit is contained in:
2026-02-24 19:17:21 -03:00
parent 18a142e070
commit 47d47d42fb
2 changed files with 10 additions and 6 deletions

View File

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

View File

@@ -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) */}
<div className="flex flex-col">
<div className="flex justify-between items-center mb-2 px-1">
<div className="flex justify-between items-center mb-1 px-1">
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500">
Galería de Fotos
</label>
@@ -1190,6 +1190,10 @@ export default function FormularioAviso({
</span>
</div>
<p className="text-[10px] text-blue-400/60 font-bold uppercase tracking-widest mb-4 px-1 italic">
Sugerencia: Subí fotos nítidas y horizontales para una mejor visualización. Tamaño máximo: 10 MB (Dim. Máx. 5000px x 5000px).
</p>
<div className="bg-[#0a0c10]/30 rounded-2xl border border-white/5 p-6">
{photos.length === 0 ? (
// ESTADO VACÍO (Grande)