mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 20:12:48 +00:00
no message
This commit is contained in:
parent
77b6c53a42
commit
d1fdec0970
@ -293,7 +293,7 @@ class File extends AbstractModel
|
|||||||
// 文本
|
// 文本
|
||||||
$data['content'] = [
|
$data['content'] = [
|
||||||
'type' => $fileExt,
|
'type' => $fileExt,
|
||||||
'content' => file_get_contents($publicPath),
|
'content' => file_get_contents($publicPath) ?: 'Content deleted',
|
||||||
];
|
];
|
||||||
$data['file_mode'] = $fileExt;
|
$data['file_mode'] = $fileExt;
|
||||||
break;
|
break;
|
||||||
@ -316,7 +316,7 @@ class File extends AbstractModel
|
|||||||
if (in_array($fileExt, self::codeExt) && $fileSize < 2 * 1024 * 1024)
|
if (in_array($fileExt, self::codeExt) && $fileSize < 2 * 1024 * 1024)
|
||||||
{
|
{
|
||||||
// 文本预览,限制2M内的文件
|
// 文本预览,限制2M内的文件
|
||||||
$data['content'] = file_get_contents($publicPath);
|
$data['content'] = file_get_contents($publicPath) ?: 'Content deleted';
|
||||||
$data['file_mode'] = 'code';
|
$data['file_mode'] = 'code';
|
||||||
}
|
}
|
||||||
elseif (in_array($fileExt, File::officeExt))
|
elseif (in_array($fileExt, File::officeExt))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user