aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/storage/cloudfiles.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/storage/cloudfiles.py')
-rw-r--r--mediagoblin/storage/cloudfiles.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mediagoblin/storage/cloudfiles.py b/mediagoblin/storage/cloudfiles.py
index 46843274..ce517932 100644
--- a/mediagoblin/storage/cloudfiles.py
+++ b/mediagoblin/storage/cloudfiles.py
@@ -42,6 +42,9 @@ class CloudFilesStorage(StorageInterface):
self.param_host = kwargs.get('cloudfiles_host')
self.param_use_servicenet = kwargs.get('cloudfiles_use_servicenet')
+ # the Mime Type webm doesn't exists, let's add it
+ mimetypes.add_type("video/webm", "webm")
+
if not self.param_host:
print('No CloudFiles host URL specified, '
'defaulting to Rackspace US')
@@ -70,8 +73,7 @@ class CloudFilesStorage(StorageInterface):
def file_exists(self, filepath):
try:
- object = self.container.get_object(
- self._resolve_filepath(filepath))
+ self.container.get_object( self._resolve_filepath(filepath))
return True
except cloudfiles.errors.NoSuchObject:
return False
@@ -92,6 +94,9 @@ class CloudFilesStorage(StorageInterface):
if mimetype:
obj.content_type = mimetype[0]
+ # this should finally fix the bug #429
+ meta_data = {'mime-type' : mimetype[0]}
+ obj.metadata = meta_data
return CloudFilesStorageObjectWrapper(obj, *args, **kwargs)