我正在尝试使用角度 js 压缩多个图像,它还在提交按钮之前显示压缩图像,但在上传这些图像后,它们将以原始大小而不是压缩大小保存在数据库中
需要进行哪些修正?请帮助...
<body ng-app="angNewsApp">
<form method='POST' action='/dashboard/ti/' enctype='multipart/form-data'>
{% csrf_token %}
<div ng-controller="demoCtrl">
<h2>Multiple</h2>
<input id="inputImage" name="file" type="file" accept="image/*" ng-model="imageList" image="imageList" resize-max-height="800" resize-max-width="800" resize-quality="0.7" resize-type="image/jpg" multiple="multiple" ng-image-compress/>
<div>
<img ng-src="{% verbatim %}{{item.compressed.dataURL}}{% endverbatim %}" ng-repeat="item in imageList" />
</div>
</div>
<button type="submit">Submit</button>
</form>
</body>
这是我正在做的演示。现在我想将这些图像保存到数据库中,但原来的图像正在......该怎么办?