angularjs - Get selected file size using org.apache.cordova.file -
using org.apache.cordova.file plugin can selected file , native path of file. after have restrict user select file according there file size. can't file size. problem can't file size using plugin. using this tutorial.
to file size, need access via metadata follows:
window.resolvelocalfilesystemurl(filepath, function (filesystem) { filesystem.getfile(filename, {create: false}, function (fileentry) { fileentry.getmetadata( function (metadata) { alert(metadata.size); // file size }, function (error) {} ); }, function (error) {} ); }, function (error) {} );
Comments
Post a Comment