Commit ac8e9f1a authored by fuyunnan's avatar fuyunnan

Merge branch 'master' of 39.100.151.123:hwq/micro

parents 40d2ffb3 79fdedbe
......@@ -53,9 +53,9 @@ class ExcelImporter
public function __construct($file, $sheetIndex = 0)
{
$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);
$this->fileType = ucfirst(strtolower(pathinfo($file, PATHINFO_EXTENSION)));
$this->reader = IOFactory::createReaderForFile($path)->load($path);
$this->filePath = $path;
$this->sheet = $this->reader->getSheet($sheetIndex);
......
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