Guest User

Untitled

a guest
Dec 13th, 2016
124
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.venue_images.forEach(function(i) {
  2.       window.resolveLocalFileSystemURL(i, (entry) => {
  3.         entry.file(function(file) {
  4.           var reader = new FileReader();
  5.  
  6.           reader.onloadend = (err) => {
  7.             var imgBlob = new Blob([reader.result], { type:file.type});
  8.             fd.append('attachments', imgBlob, 'test.jpg');
  9.             console.log(fd);
  10.           };
  11.  
  12.           reader.readAsArrayBuffer(file);
  13.  
  14.         }, (err) => {
  15.           console.log('error getting file', err);
  16.         })
  17.       }, (err) => {
  18.         console.log('Error resolving fs url', err);
  19.       })
  20.     })
RAW Paste Data