During the system test, we found that the refreshing upload function implemented by SwfUpload was unavailable on IE10. Isn't SwfUpload supported? Or another implementation method is required? Finally, we can modify the SwfUplad. JS file to support IE10. The specific solution is as follows:
Open SwfUpload. js, find the/Private: getFlashHTML generates the object tag needed to embed the flash in to the document "line and" // Private: getFlashVars builds the parameter string that will be passed "and this line, and then replace the intermediate code with the following code.
Copy codeThe Code is as follows:
SWFUpload. prototype. getFlashHTML = function (flashVersion ){
// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
Var classid = "";
Var Sys = {};
Var ua = navigator. userAgent. toLowerCase ();
If (window. ActiveXObject ){
Sys. ie = ua. match (/msie ([\ d.] +)/) [1];
If (Sys. ie & Sys. ie. substring (0, 1) = "9" | Sys. ie. substring (0, 2) = "10 "){
Classid = 'classid = "clsid: d27cdb6e-ae6d-11cf-96b8-444553540000 "';
}
}
Return ['<object', classid, 'Id = "', this. movieName, '"type =" application/x-shockwave-flash "data ="', (this. support. imageResize? This. settings. flash_url: this. settings. flash9_url), '"width ="', this. settings. button_width, '"height ="', this. settings. button_height, '"class =" swfupload "> ',
'<Param name = "wmode" value = "', this. settings. button_window_mode, '"/> ',
'<Param name = "movie" value = "', (this. support. imageResize? This. settings. flash_url: this. settings. flash9_url), '"/> ',
'<Param name = "quality" value = "high"/> ',
'<Param name = "allowScriptAccess" value = "always"/> ',
'<Param name = "flashvars" value = "' + this. getFlashVars () + '"/> ',
'</Object>']. join ("");
};
Save and run it to see the effect. It's perfect!