MediaWiki:Common.js/uploader.js:修订间差异
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
| 第786行: | 第786行: | ||
if (!this.allowedFileTypes.includes(file.name.replace(/.+\.(.+?)$/, "$1"))) { return alert(`【${file.name}】不支持上传这种格式的文件!`); } | if (!this.allowedFileTypes.includes(file.name.replace(/.+\.(.+?)$/, "$1"))) { return alert(`【${file.name}】不支持上传这种格式的文件!`); } | ||
if (file.size / 1024 / 1024 > | if (file.size / 1024 / 1024 > 8) { return alert(`【${file.name}】的大小超过8m,无法上传!`); } | ||
this.files.push(this.createFileItem(file)); | this.files.push(this.createFileItem(file)); | ||
}); | }); | ||
| 第819行: | 第819行: | ||
addSourceUrlFile() { | addSourceUrlFile() { | ||
const url = (prompt(" | const url = (prompt("请输入文件地址:(萌娘百科、哔哩哔哩等网站图片加入了防盗链,你必须把图片下载下来后使用本地上传)") || "").trim(); | ||
if (!url) { return; } | if (!url) { return; } | ||
this.files.push(this.createFileItem(url)); | this.files.push(this.createFileItem(url)); | ||