From 007f324425f3b7c1eed0a32c04e8517f6f67a573 Mon Sep 17 00:00:00 2001 From: dawoodkhan82 Date: Thu, 8 Oct 2020 08:23:46 -0400 Subject: [PATCH] small file upload fix --- gradio/processing_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gradio/processing_utils.py b/gradio/processing_utils.py index 1e4fba54d2..189d83191e 100644 --- a/gradio/processing_utils.py +++ b/gradio/processing_utils.py @@ -75,6 +75,7 @@ def decode_base64_to_binary(encoding): def decode_base64_to_file(encoding): file_obj = tempfile.NamedTemporaryFile() file_obj.write(decode_base64_to_binary(encoding)) + file_obj.flush() return file_obj