这是我的代码:
Dropzone.options.dropZoneMedia = {
maxFileSize: 10,
maxFiles: 1,
dictDefaultMessage: "Drop file here or click to upload",
dictMaxFilesExceeded: "You may only upload one file",
init: function(){
this.options.addRemoveLinks = true;
this.options.dictRemoveFile = "Delete";
},
success: function(file, response){
$scope.imageId = response.id;
$scope.addedImage.push($scope.imageId);
},
removedfile: function(id){
MediaService.deleteFile($scope.imageId)
.then((response) => {
$scope.deletedResponse = response;
console.log($scope.deletedResponse);
})
},
}
删除的文件函数接收ID,调用服务,我得到图像已从服务器删除的成功响应,但我无法弄清楚如何从dropzone中删除缩略图删除。想法?