fix: client-side file size limit 20→50MB to match server

This commit is contained in:
2026-07-12 13:03:46 +08:00
parent 3ec9e80e0d
commit de1bca9d8a

View File

@@ -99,7 +99,7 @@ const TicketCreate = {
const allowed = ['image/jpeg','image/png','image/gif','image/webp','video/mp4','video/webm'];
for (const f of fileList) {
if (!allowed.includes(f.type)) { alert(`不支持的文件类型: ${f.name}`); continue; }
if (f.size > 20 * 1024 * 1024) { alert(`文件过大: ${f.name}`); continue; }
if (f.size > 50 * 1024 * 1024) { alert(`文件过大: ${f.name}`); continue; }
if (this.files.length >= 5) { alert('最多5个文件'); break; }
this.files.push(f);
}