# wx.removeSavedFile(Object object)
with Promise style call: Supported
Mini Program plugin: Not supported
Delete local cache file
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
filePath | string | yes | File path to delete (Local path) | |
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
# sample code
wx.getSavedFileList({
success (res) {
if (res.fileList.length > 0){
wx.removeSavedFile({
filePath: res.fileList[0].filePath,
complete (res) {
console.log(res)
}
})
}
}
})