SAAS-503: PYPO -> Use the REST API to download files
Fixed disabling SSL verication
This commit is contained in:
parent
2ae45bd005
commit
024150f023
|
@ -955,7 +955,7 @@ SQL;
|
|||
$uri = $file->getAbsoluteFilePath();
|
||||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$downloadURL = "https://".$_SERVER['HTTP_HOST'].$baseUrl."rest/media/$media_id/download?verify=False";
|
||||
$downloadURL = "https://".$_SERVER['HTTP_HOST'].$baseUrl."rest/media/$media_id/download";
|
||||
$filesize = $file->getFileSize();
|
||||
|
||||
self::createFileScheduleEvent($data, $item, $media_id, $uri, $downloadURL, $filesize);
|
||||
|
|
|
@ -73,7 +73,7 @@ class PypoFile(Thread):
|
|||
url = media_item['download_url']
|
||||
|
||||
with open(dst, "wb") as handle:
|
||||
response = requests.get(url, auth=requests.auth.HTTPBasicAuth(username, ''), stream=True)
|
||||
response = requests.get(url, auth=requests.auth.HTTPBasicAuth(username, ''), stream=True, verify=False)
|
||||
|
||||
if not response.ok:
|
||||
raise Exception("%s - Error occurred downloading file" % response.status_code)
|
||||
|
|
Loading…
Reference in New Issue