Fix: Ajuste tamaño de imagen y peso.
This commit is contained in:
@@ -42,10 +42,10 @@ public class ImageStorageService : IImageStorageService
|
|||||||
throw new Exception("Formato de archivo no permitido. Solo JPG, PNG y WEBP.");
|
throw new Exception("Formato de archivo no permitido. Solo JPG, PNG y WEBP.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. Validación de Tamaño (Max 3MB)
|
// 2. Validación de Tamaño (Max 10MB)
|
||||||
if (file.Length > 3 * 1024 * 1024)
|
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)
|
// 3. Validación de Magic Numbers (Leer cabecera real)
|
||||||
|
|||||||
@@ -264,12 +264,12 @@ export default function FormularioAviso({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_SIZE = 3 * 1024 * 1024;
|
const MAX_SIZE = 10 * 1024 * 1024;
|
||||||
const oversizedFiles = newFiles.filter((file) => file.size > MAX_SIZE);
|
const oversizedFiles = newFiles.filter((file) => file.size > MAX_SIZE);
|
||||||
|
|
||||||
if (oversizedFiles.length > 0) {
|
if (oversizedFiles.length > 0) {
|
||||||
alert(
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1179,7 +1179,7 @@ export default function FormularioAviso({
|
|||||||
|
|
||||||
{/* 2. GESTOR DE FOTOS (Debajo) */}
|
{/* 2. GESTOR DE FOTOS (Debajo) */}
|
||||||
<div className="flex flex-col">
|
<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">
|
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500">
|
||||||
Galería de Fotos
|
Galería de Fotos
|
||||||
</label>
|
</label>
|
||||||
@@ -1190,6 +1190,10 @@ export default function FormularioAviso({
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</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">
|
<div className="bg-[#0a0c10]/30 rounded-2xl border border-white/5 p-6">
|
||||||
{photos.length === 0 ? (
|
{photos.length === 0 ? (
|
||||||
// ESTADO VACÍO (Grande)
|
// ESTADO VACÍO (Grande)
|
||||||
|
|||||||
Reference in New Issue
Block a user