Skip to content

Commit 1bbd06c

Browse files
author
WispX
committed
✨ Upload return image id. Closed #180
1 parent 26840ed commit 1bbd06c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
...
4040

4141
### 🛠 安装要求
42-
* PHP 版本 ≥ 5.6(≤ 7.3)
42+
* PHP 版本 ≥ 5.6
4343
* mysql 版本 ≥ 5.5
4444
* PDO 拓展
4545
* ZipArchive 支持
4646
* fileinfo 拓展
4747
* curl 拓展
4848

49-
注:推荐使用 PHP 7.3, 如果使用 FTP 功能,需要开启 PHP 的 FTP 拓展
49+
注:如果使用 FTP 功能,需要开启 PHP 的 FTP 拓展
5050

5151
### 🔍 安装教程
5252
1. 下载兰空,上传至 web 运行环境,解压。

application/common/controller/Upload.php

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

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

179179
$data = [
180-
'id' => $img->id,
180+
'id' => $model->id,
181181
'name' => $image->getInfo('name'),
182182
'url' => $url,
183183
'size' => $size,

0 commit comments

Comments
 (0)