From e2c53d34cdd6ab1c4c94b3e024c281fc8058019c Mon Sep 17 00:00:00 2001 From: valentina Date: Fri, 6 Sep 2024 17:34:31 +0200 Subject: [PATCH] Fix upload immagine utente --- src/Models/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/Upload.php b/src/Models/Upload.php index ac8a53701..97ab220df 100755 --- a/src/Models/Upload.php +++ b/src/Models/Upload.php @@ -122,7 +122,7 @@ class Upload extends Model } else { // Caricamento con l'interfaccia di upload try { - $file = $filesystem->upload($model->directory, $original_name, file_get_contents($source)); + $file = $filesystem->upload($model->directory, $original_name, file_exists($source) ? file_get_contents($source) : $source); $model->size = $file['size']; } catch (\Exception) { flash()->error(tr('Impossibile creare il file!'));