aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-08-27 21:08:10 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-08-27 21:08:10 -0500
commit1024d60208acef4742faaaac788e16ae21e3a1f4 (patch)
tree59afe26236a46a38a4a805bfab7332098e667878
parentc710e38fc34a0773f1d7fd589a05876c4757af82 (diff)
parent026074af1e85217fbcd0b5b58c931b106d0b15bd (diff)
downloadmediagoblin-1024d60208acef4742faaaac788e16ae21e3a1f4.tar.lz
mediagoblin-1024d60208acef4742faaaac788e16ae21e3a1f4.tar.xz
mediagoblin-1024d60208acef4742faaaac788e16ae21e3a1f4.zip
Merge remote branch 'jwandborg/f519_cloudfiles_performance_fix'
-rw-r--r--mediagoblin/storage.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mediagoblin/storage.py b/mediagoblin/storage.py
index d484be1f..7ada95e1 100644
--- a/mediagoblin/storage.py
+++ b/mediagoblin/storage.py
@@ -254,6 +254,8 @@ class CloudFilesStorage(StorageInterface):
self.container = self.connection.get_container(
self.param_container)
+ self.container_uri = self.container.public_uri()
+
def _resolve_filepath(self, filepath):
return '/'.join(
clean_listy_filepath(filepath))
@@ -282,7 +284,9 @@ class CloudFilesStorage(StorageInterface):
self.container.delete_object(filepath)
def file_url(self, filepath):
- return self.get_file(filepath).public_uri()
+ return '/'.join([
+ self.container_uri,
+ self._resolve_filepath(filepath)])
class MountStorage(StorageInterface):