Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
ad3b4d9647
|
@ -74,11 +74,13 @@ class Upload extends Model
|
||||||
$model = new static();
|
$model = new static();
|
||||||
|
|
||||||
// Informazioni di base
|
// Informazioni di base
|
||||||
$name = $data['name'] ?? $name;
|
if (empty($name)) {
|
||||||
$name ??= basename($source);
|
$name = $data['name'] ?? ($source['name'] ?? $source);
|
||||||
$original_name = basename($source) ?? $name;
|
}
|
||||||
$category = $data['category'] ?? $category;
|
|
||||||
|
|
||||||
|
$original_name = $source['name'] ?? $name;
|
||||||
|
$category = $data['category'] ?? $category;
|
||||||
|
|
||||||
// Nome e categoria dell'allegato
|
// Nome e categoria dell'allegato
|
||||||
$model->name = !empty($name) ? $name : $original_name;
|
$model->name = !empty($name) ? $name : $original_name;
|
||||||
$model->category = $category;
|
$model->category = $category;
|
||||||
|
|
Loading…
Reference in New Issue