diff --git a/ckanext/odsh/lib/uploader.py b/ckanext/odsh/lib/uploader.py index b71cfe52fce88c8917aa832524cdaa35ffee39ff..ab89260a54cada77b3de43f81834e2ab600bd67f 100644 --- a/ckanext/odsh/lib/uploader.py +++ b/ckanext/odsh/lib/uploader.py @@ -29,6 +29,7 @@ def _raise_validation_error_if_virus_found(filename, upload_file): def calculate_hash(upload_file): + upload_file.seek(0) hash_md5 = hashlib.md5() for chunk in iter(lambda: upload_file.read(4096), b""): hash_md5.update(chunk)