✨ Upload return image id. Closed #180
This commit is contained in:
@@ -171,13 +171,13 @@ class Upload extends Controller
|
||||
$imageData['folder_id'] = $folderId;
|
||||
}
|
||||
|
||||
if (!$img = Images::create($imageData)) {
|
||||
if (!$model = Images::create($imageData)) {
|
||||
$this->strategy->delete($pathname);
|
||||
throw new Exception('图片数据保存失败');
|
||||
}
|
||||
|
||||
$data = [
|
||||
'id' => $img->id,
|
||||
'id' => $model->id,
|
||||
'name' => $image->getInfo('name'),
|
||||
'url' => $url,
|
||||
'size' => $size,
|
||||
|
||||
Reference in New Issue
Block a user