summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2013-05-06 18:37:28 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2013-05-06 18:37:28 +0200
commit3a52886c147323d227fee78874e6d85eedf43bd4 (patch)
tree3114be58c0eaba6ca49dc21f0574d2b3ae30c07c
parent38ddecbba5f18b65e89976160d95fb91c3498dfd (diff)
Fixed hashing when uploading very small files.
-rwxr-xr-xfbin.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/fbin.py b/fbin.py
index 02200e2..d3d84c8 100755
--- a/fbin.py
+++ b/fbin.py
@@ -249,6 +249,7 @@ class Application(object):
if not hasattr(temp, 'name'):
new_temp = tempfile.NamedTemporaryFile(prefix = 'upload_', dir = settings.file_directory, delete = False)
new_temp.write(temp.getvalue())
+ new_temp.seek(0)
temp = new_temp
m = hashlib.md5()