编辑器粘贴抓取远程图片优化

feat/task1-c-wallet
Devil 2021-07-28 18:17:21 +08:00
parent a2282b51f6
commit eaa9d51f01
1 changed files with 6 additions and 0 deletions

View File

@ -349,6 +349,12 @@ class Uploader
$imgUrl = htmlspecialchars($this->fileField);
$imgUrl = str_replace("&", "&", $imgUrl);
//检查是否不允许的文件格式
if (!$this->checkType()) {
$this->stateInfo = $this->getStateInfo("ERROR_TYPE_NOT_ALLOWED");
return;
}
//http开头验证
if (strpos($imgUrl, "http") !== 0) {
$this->stateInfo = $this->getStateInfo("ERROR_HTTP_LINK");