正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -174,14 +174,14 @@ class ImageController | @@ -174,14 +174,14 @@ class ImageController | ||
| 174 | $data[] = $hash.$filename; | 174 | $data[] = $hash.$filename; |
| 175 | } | 175 | } |
| 176 | $imageModel = new ImageModel(); | 176 | $imageModel = new ImageModel(); |
| 177 | - $imageModel->insertAll($save_data); | 177 | + $imageModel->insert($save_data); |
| 178 | return $data; | 178 | return $data; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | //下载 | 181 | //下载 |
| 182 | public function download($filename){ | 182 | public function download($filename){ |
| 183 | - $path = Storage::path('./../uploads/images/'.$filename); | ||
| 184 | - return response()->download($path,$filename); | 183 | + $path = Storage::path($filename); |
| 184 | + return response()->download($path,time().rand(1,100000)); | ||
| 185 | } | 185 | } |
| 186 | /** | 186 | /** |
| 187 | * @name 统一返回参数 | 187 | * @name 统一返回参数 |
-
请 注册 或 登录 后发表评论