Fix minori

This commit is contained in:
Pek5892 2024-03-25 09:23:58 +01:00
parent 7cd57dd12a
commit 4592e7de5b
2 changed files with 5 additions and 1 deletions

View File

@ -183,7 +183,11 @@ class FatturaElettronica
$extension = '.'.strtolower($allegato['FormatoAttachment']);
}
if (preg_match('/\./', $allegato['NomeAttachment'])) {
$original = $allegato['NomeAttachment'];
} else {
$original = $allegato['NomeAttachment'].$extension;
}
try {
\Uploads::upload($content, array_merge($info, [
'name' => $allegato['NomeAttachment'],

View File

@ -79,7 +79,7 @@ class Upload extends Model
$category = isset($data['category']) ? $data['category'] : $category;
// Nome e categoria dell'allegato
$model->name (!empty($name) ? $name : $original_name);
$model->name = !empty($name) ? $name : $original_name;
$model->category = $category;
// Nome di origine dell'allegato