|
|
@ -38,7 +38,7 @@ class Upload extends BaseController |
|
|
if($message){ |
|
|
if($message){ |
|
|
$message=json_decode($message,true); |
|
|
$message=json_decode($message,true); |
|
|
// 判断链接里的图片 |
|
|
// 判断链接里的图片 |
|
|
if (isset($message['content'])) { |
|
|
if (isset($message['content']) && !empty($message['content'])) { |
|
|
$imagePath = $this->imageFileUrl($message['content']); |
|
|
$imagePath = $this->imageFileUrl($message['content']); |
|
|
if (file_exists($imagePath) && !$oldFile) { |
|
|
if (file_exists($imagePath) && !$oldFile) { |
|
|
$fileObj = false; |
|
|
$fileObj = false; |
|
|
@ -476,7 +476,7 @@ class Upload extends BaseController |
|
|
// 压缩图片地址 |
|
|
// 压缩图片地址 |
|
|
protected function getCompressImg($src, $ext, $prefix) |
|
|
protected function getCompressImg($src, $ext, $prefix) |
|
|
{ |
|
|
{ |
|
|
$newName2 = uniqid() . '.' . $ext; |
|
|
$newName2 = uniqid() . rand(0000,9999) . '.' . $ext; |
|
|
$compress_path = $prefix . $newName2; |
|
|
$compress_path = $prefix . $newName2; |
|
|
$fullPath = root_path().'public/'; |
|
|
$fullPath = root_path().'public/'; |
|
|
if($this->disk=='local'){ |
|
|
if($this->disk=='local'){ |
|
|
|