-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new feature: multiple checksum algorithms support #11
Comments
Hi @voidrank, Thanks for collaborating! |
Hi, |
What I was thinking was that the user would post the Something like: # models.py
@property
def md5(self):
# ...
@property
def sha256(self):
# ...
# views.py
# class ChunkedUploadCompleteView...
supported_checksums = ['md5', 'sha256', ...]
do_checksum_check = True
def checksum_check(self, checksum_alg, chunked_upload, checksum):
if getattr(chunked_upload, checksum_alg) != checksum:
# ...
# def _post ...
for checksum_alg in self.supported_checksums:
if checksum_alg in request.POST:
self.checksum_check(checksum_alg, chunked_upload, request.POST[checksum_alg])
break
else: # Didn't find any checksum
# raise No checksum found I don't know if you get the idea ... |
That's a pretty good idea!! I am very pleased to implement it and I will start the work after next Thursday(I have a midterm that day QAQ). Could you wait for me? |
Yeah, sure! Thanks for collaborating! |
I have submitted a pull request. And I also update demo. Could you merge it? (I added some test for django command & admin which may be a bit dirty) |
Hey @voidrank, |
Also, it would be nice to have an option to perform data integrity verification using just the file size. While this is not as robust as a checksum, it is a lot faster (see also #27). |
Hey @juliomalegria i know it has been a while could you please provide a bit more context on what you wanted to comment about so i write the code for that. Thanks |
hi,
I want to add a new feature,
If we want our service more efficient, we can use CRC. And someone cares checksum collision very much, he will choose sha384 if he want to rename his uploaded file with the checksum(it is said that it is more secure. http://security.stackexchange.com/questions/33108/why-does-some-popular-software-still-use-md5)
So I suggest that django-chunked-upload should provide more checksum algorithms.
The text was updated successfully, but these errors were encountered: