GCS storage: use self.subdir instead of hard-coded '_'

This commit is contained in:
Sybren A. Stüvel 2018-01-26 14:58:25 +01:00
parent 230b2c669c
commit de1c227ccd

View File

@ -97,7 +97,7 @@ class GoogleCloudStorageBucket(Bucket):
def _gcs_post(self, full_path, *, path=None) -> typing.Optional[gcloud.storage.Blob]:
"""Create new blob and upload data to it.
"""
path = path if path else os.path.join('_', os.path.basename(full_path))
path = path if path else os.path.join(self.subdir, os.path.basename(full_path))
gblob = self._gcs_bucket.blob(path)
if gblob.exists():
self._log.error(f'Trying to upload to {path}, but that blob already exists. '