Commit ec895278 authored by 王源's avatar 王源 🎧

修复下载远程图片bug

parent c44065ac
...@@ -49,7 +49,7 @@ class Drawer ...@@ -49,7 +49,7 @@ class Drawer
$url = $this->parseUrl($url); $url = $this->parseUrl($url);
// excel画图中下载图片时对图片名做urlencode处理,防止中文名不能正常画图片的bug // excel画图中下载图片时对图片名做urlencode处理,防止中文名不能正常画图片的bug
$filename = trim(pathinfo($url, PATHINFO_FILENAME)); $filename = trim(pathinfo($url, PATHINFO_FILENAME));
$ext = $this->getImgExt($url); $ext = strtolower(pathinfo($url, PATHINFO_EXTENSION));
$filename = "$filename.$ext"; $filename = "$filename.$ext";
$path = $this->rootPath . '/download/images/' . ($path ?: $this->savePath); $path = $this->rootPath . '/download/images/' . ($path ?: $this->savePath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment