Fixed image not uploading on asset create

This commit is contained in:
snipe 2018-10-09 17:31:52 -07:00
parent d4fa81301d
commit c7596e7741
2 changed files with 2 additions and 2 deletions

View file

@ -143,7 +143,7 @@ class AssetsController extends Controller
}
// Create the image (if one was chosen.)
if ($request->hasFile('image')) {
if ($request->has('image')) {
$image = $request->input('image');
// After modification, the image is prefixed by mime info like the following:

View file

@ -10,7 +10,7 @@
<p class="help-block" id="upload-file-status">{{ trans('general.image_filetypes_help', ['size' => \App\Helpers\Helper::file_upload_max_size_readable()]) }}</p>
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
</div>
<div class="col-md-4">
<div class="col-md-4 col-md-offset-3">
<img id="imagePreview" style="max-width: 200px;">
</div>
</div>