I have the following problem in my code it can not get into the function to get the size of the file, I'm using Phonegap for development, follow the code below
function onSuccess(imageData) {
window.resolveLocalFileSystemURL(imageData, function (fileEntry) {
fileEntry.file(function (file) {
if (file.size > 2097152) {
alert("não pode ser maior que 2mb");
} else {
//aqui vai o codigo para mostrar a imagem
}
}, function (evt) {
});
},
function () {
});
}
So, I'm trying to get the file size but it does not go into the function, it does not show anything, does anyone know to tell me the problem or am doing it wrong.