Home > Backend Development > PHP Tutorial > Resume the download at a breakpoint, determine whether the resumed file is the same file

Resume the download at a breakpoint, determine whether the resumed file is the same file

WBOY
Release: 2016-09-22 08:56:51
Original
1347 people have browsed it

I want to make a program for resuming the transfer. The basics have been implemented, but I don’t know how to judge whether the two files transferred before and after the two transfers are the same file. It’s not just a simple judgment that the file names are the same

Suppose, at first, I transfer the c:a.rm file to the other party, but it is interrupted in the middle. Next time I transfer c:directorya.rm, although the two file names are both a.rm, but the contents are completely different, then the other party How do you know whether it is a new file or a file that was not uploaded last time, or whether it is a continued upload or a re-upload?

Reply content:

I want to make a program for resuming the transfer. The basics have been implemented, but I don’t know how to judge whether the two files transferred before and after the two transfers are the same file. It’s not just a simple judgment that the file names are the same

Suppose, at first, I transfer the c:a.rm file to the other party, but it is interrupted in the middle. Next time I transfer c:directorya.rm, although the two file names are both a.rm, but the contents are completely different, then the other party How do you know whether it is a new file or a file that was not uploaded last time, or whether it is a continued upload or a re-upload?

Upload: If it is uploading, this requires the support of the client. It cannot be done by relying solely on the server. As the original poster said, there is no way to determine the user's behavior. If there is a client, you can use MD5 verification to determine whether the files are the same.

Download: The specific file downloaded by the server is determined by the URL, so as long as the parameters are correct and the client supports breakpoint continuation, there will be no problem.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template