3.8 IMG upload bug

This commit is contained in:
Fatih Alp 2021-03-14 14:35:01 +03:00
parent 1e26a8a4be
commit 9f5a4a3fcb

View File

@ -294,7 +294,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
$thumbnail = $this->fileRepository->findByNameAndFolder($fileName, $folder); $thumbnail = $this->fileRepository->findByNameAndFolder($fileName, $folder);
if (!$thumbnail) { if (!$thumbnail) {
// Create thumbnail image // Create thumbnail image
$image = Image::make(file_get_contents($adv->files[0]->url())); $image = Image::make(file_get_contents($adv->files[0]->make()->path()));
$image->resize( $image->resize(
null, null,
setting_value('visiosoft.module.advs::thumbnail_height'), setting_value('visiosoft.module.advs::thumbnail_height'),
@ -323,7 +323,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
$coverPhoto = 'files/images/' . $fileName; $coverPhoto = 'files/images/' . $fileName;
} else { } else {
$coverPhoto = $thumbnail->url(); $coverPhoto = $thumbnail->make()->path();
} }
} else { } else {
$coverPhoto = null; $coverPhoto = null;