Skip to content

Commit

Permalink
Fixed error when TUS upload is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Hoskins committed Nov 18, 2016
1 parent 5e2e637 commit b9051ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions flask_tus.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ def tus_file_upload_chunk(self, resource_id):
else:
filename = self.upload_file_handler_cb( upload_file_path, filename )

p = self.redis_connection.pipeline()
p.delete("file-uploads/{}/filename".format(resource_id))
p.delete("file-uploads/{}/file_size".format(resource_id))
p.delete("file-uploads/{}/offset".format(resource_id))
p.delete("file-uploads/{}/upload-metadata".format(resource_id))
p.execute()

if self.upload_finish_cb is not None:
self.upload_finish_cb()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name='Flask-Tus',
version='0.6.0',
version='0.6.1',
url='http://github.com/matthoskins1980/Flask-Tus/',
license='MIT',
author='Matt Hoskins',
Expand Down

0 comments on commit b9051ec

Please sign in to comment.