From 6bda83d5b59ec316806164110f8c5237cbcd0c66 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Thu, 7 Jan 2016 20:27:43 +0100 Subject: [PATCH] Add format to filename So that files have the correct extension when they are downloaded. --- pillar/application/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pillar/application/__init__.py b/pillar/application/__init__.py index e4162906..41b4fed9 100644 --- a/pillar/application/__init__.py +++ b/pillar/application/__init__.py @@ -254,7 +254,8 @@ def update_file_name(item): if f['backend'] == 'gcs': storage = GoogleCloudStorageBucket(str(item['project'])) blob = storage.Get(f['file_path'], to_dict=False) - storage.update_name(blob, item['name']) + storage.update_name(blob, "{0}.{1}".format( + item['name'], f['format'])) # Currently we search for 'file' and 'files' keys in the object properties. # This could become a bit more flexible and realy on a true reference of the