diff --git a/airtime_mvc/application/models/RabbitMq.php b/airtime_mvc/application/models/RabbitMq.php index a9f699841..b20beca2e 100644 --- a/airtime_mvc/application/models/RabbitMq.php +++ b/airtime_mvc/application/models/RabbitMq.php @@ -90,9 +90,9 @@ class Application_Model_RabbitMq $data['callback_url'] = $callbackUrl; $data['api_key'] = $apiKey; // Pass station name to the analyzer so we can set it with the file's metadata - // before uploading it to the cloud. This isn't a requirement for cloud storage, - // but put there as a safeguard, since all Airtime Pro stations will share the - // same bucket. + // and prefix the object name with it before uploading it to the cloud. This + // isn't a requirement for cloud storage, but put there as a safeguard, since + // all Airtime Pro stations will share the same bucket. $data['station_domain'] = $stationDomain = Application_Model_Preference::GetStationName(); $jsonData = json_encode($data); diff --git a/python_apps/airtime_analyzer/airtime_analyzer/cloud_storage_uploader.py b/python_apps/airtime_analyzer/airtime_analyzer/cloud_storage_uploader.py index d060f3bcc..b9178709c 100644 --- a/python_apps/airtime_analyzer/airtime_analyzer/cloud_storage_uploader.py +++ b/python_apps/airtime_analyzer/airtime_analyzer/cloud_storage_uploader.py @@ -61,7 +61,7 @@ class CloudStorageUploader: # in the object name. URL encoding the object name doesn't solve the # problem. As a solution we will replace spaces with dashes. file_name = file_name.replace(" ", "-") - object_name = "%s_%s%s" % (file_name, str(uuid.uuid4()), extension) + object_name = "%s/%s_%s%s" % (metadata["station_domain"], file_name, str(uuid.uuid4()), extension) provider_driver_class = get_driver(getattr(Provider, self._provider)) driver = provider_driver_class(self._api_key, self._api_key_secret)