问题
I've implemented upload documents functionality on browser where a user can upload around 4-5 documents at a time. However, when we upload the documents having file size around 5MB and having slow internet connection(set slow 3G network in the browser's dev tools), we can not upload all the files due to internet timeout!
To upload documents successfully having large size and slow internet connection, I've compressed the images and it solves my issue. But the user can also upload PDF files of large size. How can we compress PDF files and then upload?
来源:https://stackoverflow.com/questions/50406644/can-we-compress-pdf-files-using-javascript-if-yes-how-if-no-why