Answer the question
In order to leave comments, you need to log in
In the React app, loading an image from an iPhone on wi-fi is very slow, on the mobile Internet it is excellent. Someone faced?
I have an application written in React. Images are loaded using the following code:
<input type='file' id='single-file' onChange={props.onChange}/>
onChange = e => {
let ua = navigator.userAgent;
let is_ie = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
if (is_ie === true) {
let file = document.getElementById('single-file').files[0];
this.props.uploadImage(file);
this.props.openUpload(true);
} else {
this.props.uploadImage(e.target.files[0]);
this.props.openUpload(true);
e.target.value = '';
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question