1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-07 13:22:15 +01:00

Fix upload immagine utente

This commit is contained in:
valentina 2024-09-06 17:34:31 +02:00
parent 3c4e2dbaa7
commit e2c53d34cd

View File

@ -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!'));