diff --git a/webdav3/client.py b/webdav3/client.py index afc7d57..59526a8 100644 --- a/webdav3/client.py +++ b/webdav3/client.py @@ -83,9 +83,6 @@ class Client(object): # path to root directory of WebDAV root = '/' - # Max size of file for uploading - large_size = 2 * 1024 * 1024 * 1024 - # request timeout in seconds timeout = 30 @@ -475,11 +472,7 @@ class Client(object): raise RemoteParentNotFound(urn.path()) with open(local_path, "rb") as local_file: - file_size = os.path.getsize(local_path) - if file_size > self.large_size: - raise ResourceTooBig(path=local_path, size=file_size, max_size=self.large_size) - - self.execute_request(action='upload', path=urn.quote(), data=local_file) + self.execute_request(action='upload', path=urn.quote(), data=local_file) def upload_sync(self, remote_path, local_path, callback=None): """Uploads resource to remote path on WebDAV server synchronously. diff --git a/webdav3/exceptions.py b/webdav3/exceptions.py index b30abbc..388f8de 100644 --- a/webdav3/exceptions.py +++ b/webdav3/exceptions.py @@ -49,19 +49,6 @@ class RemoteParentNotFound(NotFound): return "Remote parent for: {path} not found".format(path=self.path) -class ResourceTooBig(WebDavException): - def __init__(self, path, size, max_size): - self.path = path - self.size = size - self.max_size = max_size - - def __str__(self): - return "Resource {path} is too big, it should be less then {max_size} but actually: {size}".format( - path=self.path, - max_size=self.max_size, - size=self.size) - - class MethodNotSupported(WebDavException): def __init__(self, name, server): self.name = name