Use breakpoint resuming to realize fast video upload

Requirement: Multithreading is enabled in the foreground, and the interface is called multiple times to realize the function of uploading video.
Analysis: 1. The front desk cuts the video into multiple slices, and the basic information (slice size sliceSize; slice starting position sliceOffset; upload success flag flag, etc.) needs to be stored in the local database SQLLite for recording and some processing.
2. The background first creates a temporary file of the total video size, and the front end writes bytes of the slice video size to the temporary file every time the interface is called.

code show as below:

Control layer:

/**
	 * 上传视频
	 * 
	 * @param request
	 * @return
	 */
	@PostMapping(value = "uploadUsVideo")
	public ServerResponse<?> uploadUsVideo(HttpServletRequest request)

Guess you like

Origin blog.csdn.net/weixin_44215804/article/details/109492217