Skip to content

Commit 10a1095

Browse files
author
Laurynas Butkus
committed
Fix format auto-detector
1 parent f39f148 commit 10a1095

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ coverage.xml
5151
# Sphinx documentation
5252
docs/_build/
5353

54+
.python-version

convertapi/task.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from convertapi import file_param, format_detector, utils
44
from .result import Result
55

6-
DEFAULT_URL_FORMAT = 'url'
6+
DEFAULT_URL_FORMAT = 'web'
77

88
class Task:
99
def __init__(self, from_format, to_format, params, timeout = None):
@@ -50,6 +50,9 @@ def __normalize_params(self):
5050
return params
5151

5252
def __detect_format(self):
53+
if str(self.to_format).lower() == 'zip':
54+
return 'any'
55+
5356
if 'Url' in self.params:
5457
return DEFAULT_URL_FORMAT
5558

0 commit comments

Comments
 (0)