aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/storage
diff options
context:
space:
mode:
authorShackra <jorgean@lavabit.com>2012-04-16 11:50:00 +0200
committerJoar Wandborg <git@wandborg.com>2012-04-16 22:06:54 +0200
commitea42790bc37085a85a68b492a43fbae867bd94d1 (patch)
tree2f01b1a0d8c39d61c6e93466d0d1da326fa14597 /mediagoblin/storage
parent2bfb811892386dfbdd6d11659ed559415ff669cb (diff)
downloadmediagoblin-ea42790bc37085a85a68b492a43fbae867bd94d1.tar.lz
mediagoblin-ea42790bc37085a85a68b492a43fbae867bd94d1.tar.xz
mediagoblin-ea42790bc37085a85a68b492a43fbae867bd94d1.zip
Save the MIMEtype to cloudfiles correctly.
Diffstat (limited to 'mediagoblin/storage')
-rw-r--r--mediagoblin/storage/cloudfiles.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mediagoblin/storage/cloudfiles.py b/mediagoblin/storage/cloudfiles.py
index 46843274..2054a0d0 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')
@@ -92,6 +95,9 @@ class CloudFilesStorage(StorageInterface):
if mimetype:
obj.content_type = mimetype[0]
+ # this should finally fix the bug #429
+ meta_data = {'mime-type' : mimetype}
+ obj.metadata = meta_data
return CloudFilesStorageObjectWrapper(obj, *args, **kwargs)