Loading src/Manager/UploadManager.php +2 −2 Original line number Diff line number Diff line Loading @@ -172,8 +172,8 @@ class UploadManager */ public static function parsePath($options, $documentRoot) { if (isset($options['temp']) && $options['temp'] && !isset($options['path'])) { // 如果是临时文件,且没有指定保存路径,修改保存路径为临时路径 if (isset($options['temp']) && $options['temp']) { // 如果是临时文件,修改保存路径为临时路径 $options['path'] = 'temp'; } $path = $documentRoot . self::$pathPrefix . $options['path'] . '/' . date('Y-m-d'); Loading src/Tools/ExcelImporter.php +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class ExcelImporter $this->config = container(ConfigInterface::class); $this->fileType = ucfirst($file->getExtension()); $this->rootPath = $this->config->get('server.settings.document_root', BASE_PATH . '/public'); $path = UploadManager::uploadExcelGetRealPath($file); $path = UploadManager::uploadExcelGetRealPath($file, ['temp' => true]); $this->reader = IOFactory::createReaderForFile($path)->load($path); $this->filePath = $path; $this->sheet = $this->reader->getSheet($sheetIndex); Loading Loading
src/Manager/UploadManager.php +2 −2 Original line number Diff line number Diff line Loading @@ -172,8 +172,8 @@ class UploadManager */ public static function parsePath($options, $documentRoot) { if (isset($options['temp']) && $options['temp'] && !isset($options['path'])) { // 如果是临时文件,且没有指定保存路径,修改保存路径为临时路径 if (isset($options['temp']) && $options['temp']) { // 如果是临时文件,修改保存路径为临时路径 $options['path'] = 'temp'; } $path = $documentRoot . self::$pathPrefix . $options['path'] . '/' . date('Y-m-d'); Loading
src/Tools/ExcelImporter.php +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class ExcelImporter $this->config = container(ConfigInterface::class); $this->fileType = ucfirst($file->getExtension()); $this->rootPath = $this->config->get('server.settings.document_root', BASE_PATH . '/public'); $path = UploadManager::uploadExcelGetRealPath($file); $path = UploadManager::uploadExcelGetRealPath($file, ['temp' => true]); $this->reader = IOFactory::createReaderForFile($path)->load($path); $this->filePath = $path; $this->sheet = $this->reader->getSheet($sheetIndex); Loading