Skip to content
Snippets Groups Projects
Commit c3a506b1 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

BaseUtils: OwncloudUploader: add new param "chunked"

parent c31f0093
No related branches found
No related tags found
No related merge requests found
......@@ -10,10 +10,10 @@ class OwncloudUploader:
self._user = user
self._password = password
def upload(self, owncloudPath: str, localFilePath: str):
def upload(self, owncloudPath: str, localFilePath: str, chunked: bool = True):
uploadPath = '{}/{}'.format(owncloudPath, os.path.basename(localFilePath))
logging.info('Uploading "{}" to "{}" @ "{}"'.format(localFilePath, self._host, uploadPath))
oc = owncloud.Client(self._host)
oc.login(self._user, self._password)
oc.put_file(uploadPath, localFilePath)
oc.put_file(uploadPath, localFilePath, chunked=chunked)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment