chengkun
2025-05-20 f6f7bd25619ad0c0dfb5e609332e9fa1db419386
js/ueditor/php/action_crawler.php
@@ -35,27 +35,22 @@
/* 抓取远程图片 */
$list = array();
if (isset($_POST[$fieldName])) {
    $source = $_POST[$fieldName];
} else {
    $source = $_GET[$fieldName];
}
$source = $_POST[$fieldName] ? $_GET[$fieldName]:"";
foreach ($source as $imgUrl) {
    $item = new Uploader($imgUrl, $config, "remote");
    $info = $item->getFileInfo();
    array_push($list, array(
        "state" => $info["state"],
        "url" => $info["url"],
        "size" => $info["size"],
        "title" => htmlspecialchars($info["title"]),
    $list[] = array(
        "state"    => $info["state"],
        "url"      => $info["url"],
        "size"     => $info["size"],
        "title"    => htmlspecialchars($info["title"]),
        "original" => htmlspecialchars($info["original"]),
        "source" => htmlspecialchars($imgUrl)
    ));
        "source"   => htmlspecialchars($imgUrl)
    );
}
/* 返回抓取数据 */
return json_encode(array(
    'state'=> count($list) ? 'SUCCESS':'ERROR',
    'list'=> $list
));
*/
    'state' => count($list) ? 'SUCCESS' : 'ERROR',
    'list'  => $list
));