|
...
|
...
|
@@ -133,7 +133,7 @@ class ImageController extends Controller |
|
|
|
if (empty($files)) {
|
|
|
|
$this->response('没有上传的文件!', 400);
|
|
|
|
}
|
|
|
|
$type = $this->param['type'];
|
|
|
|
$type = $this->request->post('type','single');
|
|
|
|
if ($type == 'multi') {
|
|
|
|
return $this->multi($files);
|
|
|
|
} else {
|
|
...
|
...
|
@@ -151,8 +151,7 @@ class ImageController extends Controller |
|
|
|
*/
|
|
|
|
public function single($files){
|
|
|
|
$hash = hash_file('md5', $files->getPathname());
|
|
|
|
var_dump($files->getClientOriginalExtension());
|
|
|
|
die();
|
|
|
|
|
|
|
|
//查看文件是否存在
|
|
|
|
$imageModel = new ImageModel();
|
|
|
|
$image_hash = $imageModel->read(['hash'=>$hash]);
|
...
|
...
|
|