Guest User

Untitled

a guest
Mar 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. window.resolveLocalFileSystemURL(Uri,
  2. function(fileEntry) {
  3. fileEntry.file(function(fileObj) {
  4. console.log("Size = " + fileObj.size);
  5. var size = fileObj.size;
  6. var megaSize = size / MEGABYTE;
  7. var roundedSize = Math.round( megaSize * 10 ) / 10;
  8.  
  9. console.log("roundedSize", roundedSize);
  10. if(roundedSize < UPLOAD_LIMIT) {
  11. _fileUploadToServer(Uri, successCB, errorCB);
  12. }
  13. else {
  14. showToast.snackbarCustom($filter('translate')('FILE_SIZE_NOT_ALLOWED'),kbUp);
  15. }
  16. },
  17. function (error) {});
  18. }, function (error) {}
Add Comment
Please, Sign In to add comment