diff --git a/WeChat/Contracts/Tools.php b/WeChat/Contracts/Tools.php index fe3882e..8209cae 100644 --- a/WeChat/Contracts/Tools.php +++ b/WeChat/Contracts/Tools.php @@ -360,6 +360,11 @@ class Tools $mycurl = new MyCurlFile((array)$value); $data[$key] = $mycurl->get(); array_push(self::$cache_curl, $mycurl->tempname); + } elseif (is_array($value) && isset($value['datatype']) && $value['datatype'] === 'MY_CURL_FILE') { + $build = false; + $mycurl = new MyCurlFile($value); + $data[$key] = $mycurl->get(); + array_push(self::$cache_curl, $mycurl->tempname); } elseif (is_string($value) && class_exists('CURLFile', false) && stripos($value, '@') === 0) { if (($filename = realpath(trim($value, '@'))) && file_exists($filename)) { $build = false; @@ -458,4 +463,4 @@ class Tools file_exists(self::$cache_path) || mkdir(self::$cache_path, 0755, true); return self::$cache_path . $name; } -} \ No newline at end of file +}