|
|
@@ -238,7 +238,7 @@ class Stroage extends Model
|
|
|
|
|
|
// 表格文件转PDF
|
|
|
$typeData = config('files.convertTypes');
|
|
|
- $typeData = $typeData ? array_keys($typeData) : ['doc', 'xls', 'xlsx', 'ppt', 'pptx'];
|
|
|
+ $typeData = $typeData ? array_keys($typeData) : ['doc','docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
|
|
if (in_array($fileType, $typeData)) {
|
|
|
$file = Stroage::onLineConvertFile($file);
|
|
|
return Stroage::getPdfFilePage($file);
|
|
|
@@ -246,7 +246,7 @@ class Stroage extends Model
|
|
|
|
|
|
// 其他文件
|
|
|
$fileTypes = config('files.fileTypes');
|
|
|
- $fileTypes = $fileTypes ? $fileTypes : ['txt', 'doc', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'];
|
|
|
+ $fileTypes = $fileTypes ? $fileTypes : ['txt', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'];
|
|
|
if (!in_array($fileType, $fileTypes)) {
|
|
|
return 0;
|
|
|
}
|
|
|
@@ -326,6 +326,8 @@ class Stroage extends Model
|
|
|
$newFile = '';
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
imagedestroy($im);
|
|
|
return $newFile;
|
|
|
}
|