Fixes #5859 - add file name/size to file upload UI (#5861)

* Fixes #5859 - add file name/size to file upload UI

* Reverting assetcontroller

Not sure exactly what happened here…

* Production assets
This commit is contained in:
snipe
2018-07-16 20:09:53 -07:00
committed by GitHub
parent b5de5ac19c
commit a4799a495a
14 changed files with 475 additions and 489 deletions
@@ -30,8 +30,8 @@ class AssetFilesController extends Controller
$destinationPath = config('app.private_uploads').'/assets';
if ($request->hasFile('assetfile')) {
foreach ($request->file('assetfile') as $file) {
if ($request->hasFile('file')) {
foreach ($request->file('file') as $file) {
$extension = $file->getClientOriginalExtension();
$filename = 'hardware-'.$asset->id.'-'.str_random(8);
$filename .= '-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;