在angular2中使用aberezkin/ng2-image-upload
我的模板中有
<image-upload
[max]="1"
[url]="uploadUrl"
[preview]="true"
[buttonCaption]="'Select Images!'"
[dropBoxMessage]="'Drop your images here!'"
(onFileUploadFinish)="imageUploaded($event)"
(onRemove)="imageRemoved($event)"
(isPending)="disableSendButton($event)"
></image-upload>这是一个电子商务网站的产品捕获/编辑屏幕的较大表单的一部分,包括此图像上传
这对于一个新产品和一个新图像来说都是很棒的,但是如果我必须编辑一个现有的产品,从而从服务器获得该产品的数据,包括图像,我如何才能使用该图像预先填充图像上传,从而允许用户保留或删除/更改它?
另外,有没有办法过滤允许的文件类型?
发布于 2017-04-08 21:54:19
https://stackoverflow.com/questions/43051891
复制相似问题