Closed littlefatroy closed 10 years ago
The maxSize
option only works in browsers that support the HTML5 File API -- Firefox, Chrome, Safari, IE10+.
In IE9 and older, the maxSize
option will have no effect. Unfortunately, there are no work arounds to fix that.
No matter what "maxSize" I set in the uploader, I can still upload the file in IE when "fileSize" > "maxSize".
By the following code in the part of SimpleAjaxUploader.js:
if ( XhrOk ) { filename = ss.getFilename( this._file.name ); // Convert from bytes to kilobytes size = Math.round( this._file.size / 1024 ); } else { filename = ss.getFilename( this._file.value ); } ext = ss.getExt( filename ); if ( !this._checkFile( filename, ext, size ) ) { return; }
It seems that the "size" is null when "XhrOk" = false. (IE makes "XhrOk" = false)Does anyone know how to fix this problem? Pretty thanks!