Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Elmer Miroslav Mosher Golovin <[email protected]>
  • Loading branch information
mishamosher authored Mar 28, 2023
1 parent 7ba965a commit 4c5a4ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions recording/src/nextcloud/talk/recording/BackendNotifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def backendRequest(backend, data):
'OCS-ApiRequest': 'true',
'Talk-Recording-Random': random,
'Talk-Recording-Checksum': checksum,
'User-Agent': f'Mozilla/5.0 (Recording) Nextcloud-Talk v{recording.__version__}',
'User-Agent': recording.USER_AGENT,
}

backendRequest = Request(url, data, headers)
Expand Down Expand Up @@ -188,7 +188,7 @@ def uploadRecording(backend, token, fileName, owner):

logger.info(f"Upload recording {fileName} to {backend} in {token} as {owner}")

url = backend + '/ocs/v2.php/apps/spreed/api/v1/recording/' + token + '/store'
url = backend.rstrip('/') + '/ocs/v2.php/apps/spreed/api/v1/recording/' + token + '/store'

fileContents = None
with open(fileName, 'rb') as file:
Expand All @@ -209,6 +209,7 @@ def uploadRecording(backend, token, fileName, owner):
'OCS-ApiRequest': 'true',
'Talk-Recording-Random': random,
'Talk-Recording-Checksum': checksum,
'User-Agent': recording.USER_AGENT,
}

uploadRequest = Request(url, data, headers)
Expand Down

0 comments on commit 4c5a4ba

Please sign in to comment.