Fixed #4381 - asset uploads

This commit is contained in:
snipe 2017-11-06 12:38:31 -08:00
parent 8e17714c12
commit 6ece593629

View file

@ -930,8 +930,8 @@ class AssetsController extends Controller
$destinationPath = config('app.private_uploads').'/assets';
if ($request->hasFile('image')) {
foreach ($request->file('image') as $file) {
if ($request->hasFile('assetfile')) {
foreach ($request->file('assetfile') as $file) {
$extension = $file->getClientOriginalExtension();
$filename = 'hardware-'.$asset->id.'-'.str_random(8);
$filename .= '-'.str_slug($file->getClientOriginalName()).'.'.$extension;