mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
✨ Upload return image id
. Closed #180
This commit is contained in:
parent
26840ede07
commit
1bbd06cb28
@ -39,14 +39,14 @@
|
||||
...
|
||||
|
||||
### 🛠 安装要求
|
||||
* PHP 版本 ≥ 5.6(≤ 7.3)
|
||||
* PHP 版本 ≥ 5.6
|
||||
* mysql 版本 ≥ 5.5
|
||||
* PDO 拓展
|
||||
* ZipArchive 支持
|
||||
* fileinfo 拓展
|
||||
* curl 拓展
|
||||
|
||||
注:推荐使用 PHP 7.3, 如果使用 FTP 功能,需要开启 PHP 的 FTP 拓展
|
||||
注:如果使用 FTP 功能,需要开启 PHP 的 FTP 拓展
|
||||
|
||||
### 🔍 安装教程
|
||||
1. 下载兰空,上传至 web 运行环境,解压。
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user