<input type="file" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
滿天的星座2017-07-05 10:56:39
This situation often happens. What usually happens is that you need to read the file content (such as reading pictures and displaying them). My solution is to get a setTimeout.
For example:
file.onchange = function(){
var files = file.files;
setTimeout(function(){
//这里干别的
},100);
};
Although it can’t be completely avoided, it can be alleviated a lot. As long as you don’t operate too quickly after taking pictures, there is generally no problem
给我你的怀抱2017-07-05 10:56:39
It should be that the memory is too small.
When you take a photo, try to enlarge the screen (digital zoom, enlarge the screen area, zoom to the maximum). The photo file will be very small. If the browser does not refresh the page, it means that the previous refresh was due to the phone memory. too small.