This article mainly introduces the implementation method of breakpoint continuous transmission of Html 5 large files. Friends who need it can refer to the large file chunking
Generally, commonly used web servers have size restrictions on submitting data to the server side. The server side will return a rejection message if the file exceeds a certain size. Of course, web servers all provide configuration files that may modify the limit size. There are also some implementations for uploading large files on the Internet by modifying the web server to limit the file size. However, this makes it a problem for the web server's safety belt. It is easy for an attacker to send a large data packet and drag your web server to death directly.
Now, for the mainstream implementation of large files upload, large files are divided into chunks. For example, for a 100M file, split it into 50 blocks according to 2M. Then upload each file to the server in turn, and then merge the files on the server after the upload is completed.
In the web, large files are uploaded, and the core mainly implements file chunking. Before the emergence of the Html5 File API, you wanted to implement file chunking transmission on the web. Only chunking of files is implemented through flash or Activex.
Under Html5, we can directly implement file chunking through the file slice method. like:
XML/HTML Code Copy content to clipboard