fix: upload limit 500MB, mount all public dirs in docker
Deploy to VPS / deploy (push) Has been cancelled

This commit is contained in:
2026-04-08 15:56:56 +00:00
parent 0118774e31
commit 3c20ce5c37
72 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -176,8 +176,8 @@ export async function POST(request: NextRequest) {
if (!ALL_EXTENSIONS.includes(ext)) {
return NextResponse.json({ error: `Type "${ext}" not allowed. Accepted: ${ALL_EXTENSIONS.join(", ")}` }, { status: 400 });
}
if (file.size > 50 * 1024 * 1024) {
return NextResponse.json({ error: "File exceeds 50MB limit" }, { status: 400 });
if (file.size > 500 * 1024 * 1024) {
return NextResponse.json({ error: "File exceeds 500MB limit" }, { status: 400 });
}
const dirPath = buildSafePath(scope, slug, subPath);
+2 -2
View File
@@ -4,7 +4,7 @@ import path from "path";
// 1. REGLAS DE SEGURIDAD ESTRICTAS
const ALLOWED_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.webp', '.mp4', '.mov'];
const MAX_FILE_SIZE = 50 * 1024 * 1024; // 50MB Límite
const MAX_FILE_SIZE = 500 * 1024 * 1024; // 500MB Límite
export async function POST(request: NextRequest) {
try {
@@ -19,7 +19,7 @@ export async function POST(request: NextRequest) {
}
if (file.size > MAX_FILE_SIZE) {
return NextResponse.json({ error: "El archivo excede el límite de 50MB" }, { status: 400 });
return NextResponse.json({ error: "El archivo excede el límite de 500MB" }, { status: 400 });
}
const ext = path.extname(file.name).toLowerCase();