Skip to content

Commit e51e39c

Browse files
committed
Define cross-browser blob slice method as widget method.
1 parent 58c0847 commit e51e39c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

js/jquery.fileupload.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin 5.31.3
2+
* jQuery File Upload Plugin 5.31.4
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -233,6 +233,9 @@
233233
'forceIframeTransport'
234234
],
235235

236+
_blobSlice: window.Blob && (Blob.prototype.slice ||
237+
Blob.prototype.webkitSlice || Blob.prototype.mozSlice),
238+
236239
_BitrateTimer: function () {
237240
this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
238241
this.loaded = 0;
@@ -632,7 +635,7 @@
632635
fs = file.size,
633636
ub = options.uploadedBytes = options.uploadedBytes || 0,
634637
mcs = options.maxChunkSize || fs,
635-
slice = file.slice || file.webkitSlice || file.mozSlice,
638+
slice = this._blobSlice,
636639
dfd = $.Deferred(),
637640
promise = dfd.promise(),
638641
jqXHR,

0 commit comments

Comments
 (0)