File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1111document = window . document ,
1212doctype = document . doctype || { } ,
1313userAgent = window . navigator . userAgent ,
14+ safari = / s a f a r i \/ / i. test ( userAgent ) && ! / c h r o m e \/ / i. test ( userAgent ) ,
1415
1516// https://github.com/blueimp/JavaScript-Load-Image/blob/master/load-image.js#L48
1617apiURL = ( window . createObjectURL && window ) || ( window . URL && URL . revokeObjectURL && URL ) || ( window . webkitURL && webkitURL ) ,
2526jQuery = window . jQuery ,
2627
2728html5 = ! ! ( File && ( FileReader && ( window . Uint8Array || FormData || XMLHttpRequest . prototype . sendAsBinary ) ) )
28- && ! ( / s a f a r i \/ / i . test ( userAgent ) && ! / c h r o m e \/ / i . test ( userAgent ) && / w i n d o w s / i. test ( userAgent ) ) , // BugFix: https://github.com/mailru/FileAPI/issues/25
29+ && ! ( safari && / w i n d o w s / i. test ( userAgent ) ) , // BugFix: https://github.com/mailru/FileAPI/issues/25
2930
3031cors = html5 && ( 'withCredentials' in ( new XMLHttpRequest ) ) ,
3132
14431444
14441445function _isRegularFile ( file , callback ) {
14451446// http://stackoverflow.com/questions/8856628/detecting-folders-directories-in-javascript-filelist-objects
1446- if ( ! file . type && ( file . size % 4096 ) === 0 && ( file . size <= 102400 ) ) {
1447+ if ( ! file . type && ( safari || ( ( file . size % 4096 ) === 0 && ( file . size <= 102400 ) ) ) ) {
14471448if ( FileReader ) {
14481449try {
14491450var Reader = new FileReader ( ) ;
You can’t perform that action at this time.
0 commit comments