Home >Backend Development >PHP Tutorial >Large file upload solution
The traditional HTML method is no longer able to meet the needs of uploading very large files. Not to mention 100MB, 50MB is very large for the server. The service not only has to open a special link to wait for the file to be uploaded, but also allocates the same size of memory to save the file, which is quite stressful for the server.
In actual network environments, files of about 10MB generally need to be realized with the help of controls. On the one hand, it is because the domestic network environment is not stable, and on the other hand, it is due to the load of the server.
Like the oversized attachment upload function in QQ mailbox, the oversized attachment upload control in 115 Netdisk, Huawei Netdisk (DBank), and Kingsoft Express, they all use controls to implement the oversized file upload function.
They use the control to divide a large file, such as 1G, into many small pieces, each small piece is about 128KB, and then upload it in a loop until the upload is complete.
Every time the server receives a small piece, it is equivalent to receiving a separate file, which will be written directly to the hard disk. Finally, combine all accepted files.
The advantage of this is that it reduces the pressure on the server, improves the load capacity of the server, and allows the server to handle more user requests.
jQuery File Upload is a Jquery image upload component that supports multi-file upload, cancellation, deletion and breakpoint resumption, thumbnail preview before upload, list display of image size, support for upload progress bar display; supports various dynamic language development Service-Terminal.