rabin 11 months ago
parent
commit
02a9da1121
1 changed files with 1 additions and 6 deletions
  1. 1 6
      lib/Store/Qiniu.php

+ 1 - 6
lib/Store/Qiniu.php

@@ -27,7 +27,7 @@ class Qiniu extends Core implements Config
             $this->file = $ret['key'];
             if (!$this->limit) {
                 $data = Dever::curl($this->output['url'] . '?imageInfo');
-                if ($data) {
+                if ($data && !strstr($data, 'unsupported format')) {
                     $data = Dever::json_decode($data);
                     if (isset($data['width'])) {
                         $this->limit = array($data['width'], $data['height']);
@@ -45,11 +45,6 @@ class Qiniu extends Core implements Config
                         $method->delete($this->file);
                         return $this->output;
                     }
-                } else {
-                    $this->output['status'] = -1;
-                    $this->output['message'] = '上传失败';
-                    $method->delete($this->file);
-                    return $this->output;
                 }
             }