Created
February 7, 2016 20:36
-
-
Save hoolymama/6d44d2ba06761b2c1b5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.resolveLocalFileSystemURL( | |
imageUri, | |
function(fileEntry){ | |
newFileName = Math.random().toString(36).substring(7) + "." + imageUri.split('.').pop(); | |
window.resolveLocalFileSystemURL(cordova.file.dataDirectory, | |
function(dirEntry) { | |
fileEntry.moveTo(dirEntry, newFileName, successfn, failfn); | |
}, | |
failfn); | |
}, | |
failfn | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment