Fix bug in image process logic that wouldn't resize the height. Also make it possible to choose files from android as well as pictures directly.

This commit is contained in:
Daniel Meltzer 2016-05-22 15:03:59 -05:00
parent fcc79456fd
commit b3454b1c24

View file

@ -373,7 +373,7 @@
<label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label> <label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
<div class="col-md-5"> <div class="col-md-5">
<!-- {{ Form::file('image') }} --> <!-- {{ Form::file('image') }} -->
<input type="file" id="file-upload" accept="image/*" capture="camera" name="image"> <input type="file" id="file-upload" accept="image/*" name="image">
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>
@ -561,7 +561,7 @@ $(function () {
newWidth = maxWidth; newWidth = maxWidth;
} else { } else {
newWidth = width * (maxHeight/height); newWidth = width * (maxHeight/height);
newHeight = height; newHeight = maxHeight;
} }
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');