I've a chunk upload system that allows people to upload a file in chunk. Now, at the end of the process I want to provide the md5 or sha1 of the whole file.
md5/sha1 have the property update
which should work great in case of chunks, you just need to update(content_of_the_chunk)
for every chunk.
The problem is: where and how I should store the md5/sha1 object?
I'm using django, and i've several machine that handle the request. Such that I can't store the object in the session or in memory. I should put it in the database, but in the db I can only put the hexdigest
(or a string) that then I can't sum or convert back to be used to do the update
. How can I do?