In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to achieve file breakpoint continuation function through Java" related knowledge, editor through the actual case to show you the process of operation, the method of operation is simple and fast, practical, I hope that this "how to achieve file breakpoint continuation function through Java" article can help you solve the problem.
What is a breakpoint continuation?
When a user uploads a large file, the network almost takes several hours. in case the line is interrupted, the server that does not have a breakpoint can only retransmit it from scratch, which allows the user to continue to transmit from the place where the upload is disconnected. this greatly reduces the user's annoyance.
Solve the problem of insufficient memory in the server for uploading large files
Solve the problem that if the upload is terminated due to other factors, and the upload can still be resumed after refreshing the browser, restart the browser (close the browser and then open) can still continue to upload, restart the computer can still upload
If the content of the file is lost due to network fluctuation during the upload process, it needs to be automatically detected and re-uploaded.
Solution
Front end
Files that need to be uploaded separately
You need to specify the file sequence number of the uploaded multipart file.
Need to monitor the upload progress and control the progress bar
After uploading, you need to send a merge request.
Blob object, manipulating fil
Back end
API for uploading parts
Interface for merging shards
Get the API for sharding
Other tool methods to assist
What you need to pay attention to at the front end is: file cutting, and progress bar
What you need to pay attention to at the back end is where the fragments are stored and how to merge the fragments.
Effect demonstration
First find the file to be uploaded
When we start uploading the progress bar, it will change, and when we click stop upload, the progress bar will stop.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.