Return MD5 of existing files on open #145
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #137 (involves reverting #113).
#113 changed the behavior of
open
so that it always returns an empty md5 dict. This means the client will always send all their files each time. Interestingly, md5 checking is done during upload requests. Not only is this inefficient, it is not even needed: If the client already sent us their latest version of the file, there's no point in checking md5 at this point, just save it. The entire point of md5 was so that the client wouldn't need to send us everything.Changes proposed in this PR:
open
request. This way the client can compare checksums and only send over new and updated files.file_exists
is removed since it's not useful or even worth it to compare checksums during an upload request. The client should be able to make the choice of what files it want uploaded. And it makes no difference in the end if the client uploaded an existing file. (In fact, if by some odd chance, two files resulted in the same md5, this would be the only way it could get updated).