我使用毕加索
this.camera.getPicture(options).then(
(imageData) => {
const formData = new FormData();
formData.append('file', imageData);
let newName = this.randomString(6) + new Date().getTime() + "." + file.type;
alert(JSON.stringify(formData));
this.http.post("//localhost:3000/api/v1/Admin/saveAllImages", formData)
.pipe(
finalize(() => {
// loading.dismiss();
})
)
.subscribe(res => {
if (res['success']) {
this.presentToast('File upload complete.')
} else {
this.presentToast('File upload failed.')
}
});
};
}
我要在用户注销时清除所有缓存的图像。