Correzione minore #912
This commit is contained in:
parent
7e5e370176
commit
b44110cd24
|
@ -22,6 +22,7 @@ namespace Models;
|
|||
use Common\SimpleModelTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Intervention\Image\ImageManagerStatic;
|
||||
use Util\FileSystem;
|
||||
|
||||
class Upload extends Model
|
||||
{
|
||||
|
@ -76,7 +77,7 @@ class Upload extends Model
|
|||
return null;
|
||||
}
|
||||
|
||||
$model->size = \Util\FileSystem::fileSize($directory.'/'.$filename);
|
||||
$model->size = FileSystem::fileSize($directory.'/'.$filename);
|
||||
$model->user()->associate(auth()->getUser());
|
||||
|
||||
$model->save();
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Util\FileSystem;
|
||||
|
||||
/**
|
||||
* Classe per la gestione degli upload del progetto.
|
||||
*
|
||||
|
@ -126,7 +128,7 @@ class Uploads
|
|||
// Registrazione del file
|
||||
$data['filename'] = $filename;
|
||||
$data['original'] = $original;
|
||||
$data['size'] = $source['size'];
|
||||
$data['size'] = FileSystem::fileSize($directory.'/'.$filename);
|
||||
self::register($data);
|
||||
|
||||
// Operazioni finali
|
||||
|
|
Loading…
Reference in New Issue