How to zip 100 mb files during (before) upload so that upload speed can be increased? [duplicate]

泄露秘密 提交于 2019-12-07 15:19:28

There's no way to manipulate the file like this with a plain html form and PHP script. For one reason, with the browser's sandbox, there's no access to the client's filesystem.

You would probably want to explore a Java Applet, Silverlight, Flash type solution, something richer on the client that can be allowed access to the file.

Here's one example using Silverlight

In order to zip the file before upload it needs to be done on client side. PHP is of no use there because PHP is server-side only.

Option 1: You ask your clients to upload those files already zipped (looks like thats not what you want).

Option 2: You need a way to do it serverside by javascript code - to be honest i doubt that there is an easy solution for that if at all. Maybe a zip data stream could work, but for that special permissions for the script (f.e. ActiveX) are required - and today no upto date browser will allow that.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!