fix: 图片媒体文件无法预览

This commit is contained in:
kuaifan 2021-12-26 01:20:25 +08:00
parent f7b5a2e971
commit 5bdd6e15e4

View File

@ -74,7 +74,7 @@ class FileContent extends AbstractModel
$content['preview'] = false;
if ($content['ext'] && !in_array($content['ext'], ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'])) {
$url = 'http://' . env('APP_IPPR') . '.3/' . $content['url'];
if ($type == 'image') {
if (in_array($type, ['picture', 'image', 'tif', 'media'])) {
$url = Base::fillUrl($content['url']);
}
$content['url'] = base64_encode($url);