Skip to content

Commit b23fc23

Browse files
author
WispX
committed
✨ 上传接口返回ID
1 parent 97b2eaf commit b23fc23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

application/common/controller/Upload.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,13 @@ public function exec()
171171
$imageData['folder_id'] = $folderId;
172172
}
173173

174-
if (!Images::create($imageData)) {
174+
if (!$img = Images::create($imageData)) {
175175
$this->strategy->delete($pathname);
176176
throw new Exception('图片数据保存失败');
177177
}
178178

179179
$data = [
180+
'id' => $img->id,
180181
'name' => $image->getInfo('name'),
181182
'url' => $url,
182183
'size' => $size,

0 commit comments

Comments
 (0)