fix: client-side file size limit 20→50MB to match server
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user