Allow empty files to be uploaded if check content is off.

This commit is contained in:
John Chilton
2018-06-29 15:56:39 -07:00
parent 29f8e29b0b
commit 9b232c87ad
+1 -1
View File
@@ -108,7 +108,7 @@ def add_file(dataset, registry, output_path):
if not os.path.exists(dataset.path):
raise UploadProblemException('Uploaded temporary file (%s) does not exist.' % dataset.path)
if not os.path.getsize(dataset.path) > 0:
if check_content and not os.path.getsize(dataset.path) > 0:
raise UploadProblemException('The uploaded file is empty')
stdout, ext, datatype, is_binary, converted_path = handle_upload(