php - Based on webuploader, large video files can be uploaded in pieces and sections, and it supports resumable uploads (refreshing, closing the page, re-uploading, network interruption, etc.)

renderings

Before the file is uploaded, check whether the file has been uploaded. If it has been uploaded, it will prompt "the file already exists", and if it has not been uploaded, upload it directly.

Upload large files in pieces based on php+webuploader, with a progress bar, support breakpoint resume (refresh, close the page, re-upload, network interruption, etc.),

When the video is uploaded, it will be uploaded according to the set parameters (segment size, number of segments). During the upload process, a temporary folder will be generated in the target folder to store the temporary segments. After all the segments are uploaded , will be reassembled into a complete video according to the serial number, and the temporary file will be deleted.


You can directly copy the source code of the example, both the front and back end codes , and you can apply it to your project with a little modification.

As shown in the figure below, when a user uploads a video file (MP4, AVI, etc.), the upload will be performed in segments, and no matter the page is refreshed or closed in the middle, it will be calculated and uploaded by itself:

示例源代码干净整洁,注释详细

insert image description hereinsert image description here

Preparation Phase

First download webuploader , and then import it according to the sample code.

sample source code

Guess you like

Origin blog.csdn.net/weixin_50545213/article/details/129118360