mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Refined upload code
This commit is contained in:
parent
ec68bd7842
commit
b1ac024725
|
@ -912,8 +912,8 @@ class AssetsController extends Controller
|
|||
|
||||
$destinationPath = config('app.private_uploads').'/assets';
|
||||
|
||||
if ($request->file('image')) {
|
||||
foreach (Input::file('assetfile') as $file) {
|
||||
if ($request->hasFile('image')) {
|
||||
foreach ($request->file('image') as $file) {
|
||||
$extension = $file->getClientOriginalExtension();
|
||||
$filename = 'hardware-'.$asset->id.'-'.str_random(8);
|
||||
$filename .= '-'.str_slug($file->getClientOriginalName()).'.'.$extension;
|
||||
|
|
Loading…
Reference in a new issue