From 0dda2def53751dbf59e41982ba69a74ce651e25c Mon Sep 17 00:00:00 2001
From: Benjamin Becker <benjamin.becker@dataport.de>
Date: Tue, 10 Dec 2019 14:36:16 +0000
Subject: [PATCH] resets file pointer to 0

---
 ckanext/odsh/lib/uploader.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ckanext/odsh/lib/uploader.py b/ckanext/odsh/lib/uploader.py
index b71cfe52..ab89260a 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)
-- 
GitLab