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?
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.