my.removeSavedFile
Delete a saved file.
Supported types of mini programs: DSL, H5+
Sample Code
copy
my.getSavedFileList({
success:(res)=>{
my.removeSavedFile({
apFilePath:res.fileList[0].apFilePath,
success:(res)=>{
console.log('remove success')
}
})
}
});Parameters
Object type with the following attributes:
| Property | Type | Required | Description |
| apFilePath | String | Yes | File path. |
| success | Function | No | Callback function upon call success. |
| fail | Function | No | Callback function upon call failure. |
| complete | Function | No | Callback function upon call completion (to be executed upon either call success or failure). |
Error code
Error code | Error message | Further action |
2 | invalid parameter | Refer to the previous Parameters table to ensure that all parameters are specified correctly, and that all required parameters are provided. |
12 | file does not exist | Ensure that the apFilePath parameter is specified correctly and the target file exists. |
15 | Delete file failed | Failed to delete the file. Please try again or check the file permissions. |