提交 a444028b 编写于 作者: D Devil

粘贴数据当前站点图片不重复采集

上级 03efc64e
......@@ -274,10 +274,15 @@ class UeditorService
);
$field_name = self::$current_config['catcherFieldName'];
/* 抓取远程图片 */
// 当前站点域名或者附件域名不下载
$cdn_attachment_host = MyFileConfig('common_cdn_attachment_host', '', __MY_PUBLIC_URL__, true);
// 抓取远程图片
$list = array();
$source = isset(self::$params[$field_name]) ? self::$params[$field_name] : self::$params[$field_name];
foreach($source as $imgUrl)
{
if(GetUrlHost($imgUrl) != $cdn_attachment_host)
{
$up = new \base\Uploader($imgUrl, $temp_config, "remote");
/**
......@@ -305,6 +310,7 @@ class UeditorService
}
}
}
}
if(!empty($list))
{
return DataReturn('success', 0, $list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册