Skip to content

Commit

Permalink
Hot minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-dimitru committed Jan 19, 2017
1 parent 4dc0229 commit d1e8eee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion files.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class FilesCollection
_URL = window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL || false
if window?.Worker and window?.Blob and _URL
@_supportWebWorker = true
@_webWorkerUrl = _URL.createObjectURL(new Blob(['!function(a){"use strict";a.onmessage=function(b){var c=b.data.f.slice(b.data.cs*(b.data.cc-1),b.data.cs*b.data.cc);if(b.data.ib===!0)postMessage({bin:c,chunkId:b.data.cc});else{var d;a.FileReader?(d=new FileReader,d.onloadend=function(a){postMessage({bin:(d.result||a.srcElement||a.target).split(",")[1],chunkId:b.data.cc,s:b.data.s})},d.onerror=function(a){throw(a.target||a.srcElement).error},d.readAsDataURL(c,b.data.cs*b.data.cc)):a.FileReaderSync?(d=new FileReaderSync,postMessage({bin:d.readAsDataURL(c).split(",")[1],chunkId:b.data.cc})):postMessage({bin:null,chunkId:b.data.cc,error:"File API is not supported in WebWorker!"})}}}(this);'], {type: 'application/javascript'}))
@_webWorkerUrl = _URL.createObjectURL(new Blob(['!function(a){"use strict";a.onmessage=function(b){var c=b.data.f.slice(b.data.cs*(b.data.cc-1),b.data.cs*b.data.cc);if(b.data.ib===!0)postMessage({bin:c,chunkId:b.data.cc});else{var d;a.FileReader?(d=new FileReader,d.onloadend=function(a){postMessage({bin:(d.result||a.srcElement||a.target).split(",")[1],chunkId:b.data.cc,s:b.data.s})},d.onerror=function(a){throw(a.target||a.srcElement).error},d.readAsDataURL(c)):a.FileReaderSync?(d=new FileReaderSync,postMessage({bin:d.readAsDataURL(c).split(",")[1],chunkId:b.data.cc})):postMessage({bin:null,chunkId:b.data.cc,error:"File API is not supported in WebWorker!"})}}}(this);'], {type: 'application/javascript'}))
else if window?.Worker
@_supportWebWorker = true
@_webWorkerUrl = Meteor.absoluteUrl 'packages/ostrio_files/worker.min.js'
Expand Down
2 changes: 1 addition & 1 deletion worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
throw (error.target || error.srcElement).error;
};

fileReader.readAsDataURL(_chunk, e.data.cs * e.data.cc);
fileReader.readAsDataURL(_chunk);

} else if (root.FileReaderSync) {
fileReader = new FileReaderSync();
Expand Down
2 changes: 1 addition & 1 deletion worker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d1e8eee

Please sign in to comment.