From 1dc72d5ebec05a341775d0242aa71983e54745ad Mon Sep 17 00:00:00 2001 From: drigato Date: Fri, 7 Nov 2014 11:51:11 -0500 Subject: [PATCH] Changed Amazon S3 download URL format so it works with S3_EU_WEST region. Updated amazon config file path in the downloader class --- airtime_mvc/application/models/airtime/CloudFile.php | 2 +- python_apps/pypo/cloud_storage_downloader.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CloudFile.php b/airtime_mvc/application/models/airtime/CloudFile.php index a31660403..a30eedc6c 100644 --- a/airtime_mvc/application/models/airtime/CloudFile.php +++ b/airtime_mvc/application/models/airtime/CloudFile.php @@ -41,7 +41,7 @@ class CloudFile extends BaseCloudFile $scheme = $endpoint->getScheme(); $host = $endpoint->getHost(); $s3_bucket = $amazon_s3->getBucket(); - return "$scheme://$host/$s3_bucket/".utf8_encode($resource_id); + return "$scheme://$s3_bucket.$host/".utf8_encode($resource_id); } /** diff --git a/python_apps/pypo/cloud_storage_downloader.py b/python_apps/pypo/cloud_storage_downloader.py index 0a129f1d0..4565985e9 100644 --- a/python_apps/pypo/cloud_storage_downloader.py +++ b/python_apps/pypo/cloud_storage_downloader.py @@ -7,7 +7,7 @@ import hashlib from libcloud.storage.types import Provider, ObjectDoesNotExistError from libcloud.storage.providers import get_driver -CONFIG_PATH = '/etc/airtime/airtime.conf' +CONFIG_PATH = '/etc/airtime-saas/amazon.conf' class CloudStorageDownloader: """ A class that uses Apache Libcloud's Storage API to download objects from