Ionic Delete File Using Native Url
I am using CSDK image editor to edit the image. Here is the method to edit the image:- CSDKImageEditor.edit(success, error, imageUrl, options); So on success method editor is retu
Solution 1:
Hybrid applications do not have direct access to file System. This is a reason why you cannot use content://media/23
.
You can use cordova-plugin-file by Apache to access to file and this Post how to delete it:
var path = "file:///storage/emulated/0";
var filename = "myfile.txt";
window.resolveLocalFileSystemURL(path, function(dir) {
dir.getFile(filename, {create:false}, function(fileEntry) {
fileEntry.remove(function(){
// The file has been removed succesfully
},function(error){
// Error deleting the file
},function(){
// The file doesn't exist
});
});
});
Solution 2:
I had same problem with Filepath Plugin. All I had just removed the last commit and It's working fine. On last commit only permission has been added, so I don't think it will affect your app.
Post a Comment for "Ionic Delete File Using Native Url"