Created
April 4, 2017 21:13
-
-
Save laerciobernardo/5b05faa6a66eae6a3457a4414395f6ec 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
var filesPath = ["file:///storage/emulated/0/myfile.txt","file:///storage/emulated/0/folder", "file:///storage/emulated/0/other-file.txt"]; | |
function processFilesPaths(filesPath) { | |
angular.forEach(data, function (filePath) { | |
window.resolveLocalFileSystemURL(filePath, function (fileEntry) { | |
fileEntry.file(function (file) { | |
vm.attachments.push(file); | |
}); | |
}); | |
}); | |
} | |
processFilePaths(filesPath); | |
PageDataService.uploadFiles(vm.attachments).then(function (result) { | |
console.log("RESULT UPLOAD", result) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment