We have a website where clients can upload files to our server. This is working fine in Chrome & Firefox, but Internet Explorer seems to have a conflict with the javascript we are using. The problem area looks like this:
And function uploadFile() is not running in IE. The function is below, and the problem may have something to do with webkitslice being depreciated.
We need to get this so it works properly in all major browsers. Let me know if you have any questions.
function uploadFile(id,block,folder){
var files=[login to view URL](id).files;
var blob = files[0];
var BYTES_PER_CHUNK = 1024 * 1024; // 1MB chunk sizes.
var SIZE = [login to view URL];
var start = block*BYTES_PER_CHUNK;
var end = (block+1)*BYTES_PER_CHUNK;
if(end>SIZE-1)end=SIZE-1;
if(start < SIZE) {
// Note: [login to view URL] has changed semantics and been prefixed. See [login to view URL]
if ('mozSlice' in blob) {
var chunk = [login to view URL](start, end);
} else {
// webkitSlice depreciated, changed to slice elliott
// var chunk = [login to view URL](start, end);
var chunk = [login to view URL](start, end);
}
upload(chunk,[login to view URL],end-start,[login to view URL],id,block,folder);
}else return false;
return true;
};