Commit c3f04aee authored by jiangkebao's avatar jiangkebao

Merge branch 'master' of git.huaperfect.com:hwq/micro

parents 897ce0b9 d8c9d2ed
...@@ -326,13 +326,13 @@ class Exporter ...@@ -326,13 +326,13 @@ class Exporter
} }
break; break;
case self::DOWNLOAD_TYPE_RETURN_FILE_PATH: case self::DOWNLOAD_TYPE_RETURN_FILE_PATH:
$f = $_SERVER['DOCUMENT_ROOT'] . "/tmp/data"; $filePath = BASE_PATH . '/public/upload/';
if (!file_exists($f)) { !is_dir($filePath) && mkdir($filePath, 0777, true);
mkdir($f, 0777, true); $salt = md5(date("YmdHis") . '-' . rand(1, 300));
} $returnFilename = 'upload/' . $salt . '-' . $filename;
$f .= "/" . $filename; $fileName = $filePath . $salt . '-' . $filename;
$objWriter->save($f); $objWriter->save($fileName);
return $f; return config('app_domain') . '/' . $returnFilename;
break; break;
default: default:
throw new \Exception('不支持此种下载类型'); throw new \Exception('不支持此种下载类型');
......
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