SAAS-503: PYPO -> Use the REST API to download files

Fixed disabling  SSL verication
This commit is contained in:
drigato 2014-12-03 14:50:58 -05:00
parent 2ae45bd005
commit 024150f023
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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)