mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Fixed image not uploading on asset create
This commit is contained in:
parent
d4fa81301d
commit
c7596e7741
|
@ -143,7 +143,7 @@ class AssetsController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the image (if one was chosen.)
|
// Create the image (if one was chosen.)
|
||||||
if ($request->hasFile('image')) {
|
if ($request->has('image')) {
|
||||||
$image = $request->input('image');
|
$image = $request->input('image');
|
||||||
|
|
||||||
// After modification, the image is prefixed by mime info like the following:
|
// After modification, the image is prefixed by mime info like the following:
|
||||||
|
|
|
@ -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>
|
<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>') !!}
|
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4 col-md-offset-3">
|
||||||
<img id="imagePreview" style="max-width: 200px;">
|
<img id="imagePreview" style="max-width: 200px;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue