|
...
|
...
|
@@ -239,11 +239,7 @@ class NewsLogic extends BaseLogic |
|
|
|
if (preg_match('/^data:image\/(png|jpg|jpeg|gif);base64,/', $src, $match)) {
|
|
|
|
$imageType = $match[1]; // Image type (png, jpg, etc.)
|
|
|
|
$base64Data = preg_replace('/^data:image\/(png|jpg|jpeg|gif);base64,/', '', $src);
|
|
|
|
$decodedData = base64_decode($base64Data);
|
|
|
|
if ($decodedData === false) {
|
|
|
|
continue; // 如果解码失败,则跳过
|
|
|
|
}
|
|
|
|
$imageUrl = $this->manager_uploads($decodedData,$imageType);
|
|
|
|
$imageUrl = $this->manager_uploads($base64Data,$imageType);
|
|
|
|
$updatedSources[$imageUrl] = $src;
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|