canvas compressed image upload

Question: data front-end development process will inevitably submit the data to the background, but if it is submitted too large, especially upload pictures of such demand, if not upload the picture compression process, it is inevitable that the situation long time there will be a request for the user experience is certainly not too friendly, and so at this time how the picture will be compressed it?

Directly on the code:

But this cn.toblob () method does not support the following for ios9 or Apple phone, if you want to develop a h5 app, it is recommended to call native.js compression native, compressed upload

 

Guess you like

Origin www.cnblogs.com/wrhbk/p/10980452.html