Compatible processing of IE8 and IE8 + – upload file stream-v1.js

Time:2021-3-4

Requirement Description:
In the image system, the user wants to prompt the operation that does not meet the replacement conditions and interrupt the upload operation when clicking the replacement file.
The original operation of the system is to open the file upload window, select the file to submit, and then prompt that it does not meet the replacement conditions

In order to solve the above user needs and meet the IE8 and above browser, finally found the following solutions

Ie11 and above browsers:
Compatible processing of IE8 and IE8 + - upload file stream-v1.js
openFileSelectDialogInterception method can be added in

IE8 stream-v1.js uploads the processing logic of creating objects for opening the local file upload window, which is relatively complicated
Compatible processing of IE8 and IE8 + - upload file stream-v1.js
_evenHandlerThe trigger event can be monitored in. To open a local file window, it needs to be triggered when you click. Therefore, you can do some logical processing when you move the mouse in. Here, set the display property of the object to none, and then the event of the object will not take effect
Compatible processing of IE8 and IE8 + - upload file stream-v1.js

Compatible processing of IE8 and IE8 + - upload file stream-v1.js
At this time, click the replace file button, and the event bound to the object parent element will take effect. A user prompt will pop up, and the display property of object will be set to ” or block
Compatible processing of IE8 and IE8 + - upload file stream-v1.js

Recommended Today

Practice analysis of rust built-in trait: partialeq and EQ

Abstract:Rust uses traits in many places, from simple operator overloading to subtle features like send and sync. This article is shared from Huawei cloud community《Analysis of rust built-in trait: partialeq and EQ》Author: debugzhang Rust uses traits in many places, from simple operator overloading to subtle features like send and sync. Some traits can be automatically […]