我正在使用以下插件上传图片 https://www.npmjs.com/package/ng-file-upload
但是当我选择图像时,为什么显示模糊图像?
这是我的代码 http://jsfiddle.net/ujnmzf8e/1/
org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111
答案 0 :(得分:0)
您可以调整图像大小并设置照片质量,就像这样,我继续删除了拇指类。此外,文档链接也位于此处。NgUploadFeatures
<fieldset>
<legend>Upload on form submit</legend>
Username:
<input ngf-resize="{width: 100, height: 100, quality: .8, type: 'image/jpeg', centerCrop: true, pattern='.jpg', restoreExif: true}" type="file" ngf-select ng-model="picFile" name="file"
accept="image/*" ngf-max-size="2MB" required
ngf-model-invalid="errorFile">
<i ng-show="myForm.file.$error.required">*required</i><br>
<i ng-show="myForm.file.$error.maxSize">File too large
{{errorFile.size / 1000000|number:1}}MB: max 2M</i>
<img ng-show="myForm.file.$valid" ngf-thumbnail="picFile" > <button ng-click="picFile = null" ng-show="picFile">Remove</button>
<br>
<button ng-disabled="!myForm.$valid"
ng-click="uploadPic(picFile)">Submit</button>
<span class="progress" ng-show="picFile.progress >= 0">
<div style="width:{{picFile.progress}}%"
ng-bind="picFile.progress + '%'"></div>
</span>
<span ng-show="picFile.result">Upload Successful</span>
<span class="err" ng-show="errorMsg">{{errorMsg}}</span>
</fieldset>