Пример #1
0
	function requestRevealZip() {
		JSZipUtils.getBinaryContent('js/reveal/reveal.zip', function(err, data) {
			if(err)
				throw err;
			zip = new JSZip(data);
		});
	}
Пример #2
0
 return new JSZip.external.Promise((resolve, reject) => {
   JSZipUtils.getBinaryContent(this.container.dataset.endpoint, (err, data) => {
     if (err) {
       reject(err);
     } else {
       resolve(data);
     }
   });
 });
Пример #3
0
		return new Promise(function (resolve, reject) {
			JSZipUtils.getBinaryContent(path, function(err, data) {
				JSZip.loadAsync(data).then(function(cbz) {
					resolve(new CBZ(cbz));
				}, function(error) {
					reject(error);
				});
			});
		});
function loadRemoteFile(url, handler) {
  var zipUtils = require('jszip-utils');
  zipUtils.getBinaryContent(url, function(err, data) {
    if (err) {
      handler(null);
      return;
    }
    importFile(data, handler);
  });
}
Пример #5
0
 resolve => {
     JSZipUtils.getBinaryContent(
         imgDBEntry.image,
         (err, imageFile) => {
             const wImgId = this.addImage(
                 imgDBEntry.image.split('/').pop(),
                 imageFile
             )
             this.imgIdTranslation[image] = wImgId
             resolve()
         }
     )
 }
Пример #6
0
 return new Promise((resolve, reject) => {
     let getUrl = _.findWhere(
         this.entries,
         {filename: this.newImageEntries[this.counter].oldUrl.split('/').pop()}
     ).url
     let mimeString = this.newImageEntries[this.counter].file_type
     JSZipUtils.getBinaryContent(getUrl, (err, data) => {
         let dataView = new DataView(data)
         let blob = new window.Blob([dataView], {type: mimeString});
         this.newImageEntries[this.counter]['file'] = blob
         this.counter++
         this.getImageUrlEntry().then(()=>{
             resolve()
         })
     })
 })