From ea42790bc37085a85a68b492a43fbae867bd94d1 Mon Sep 17 00:00:00 2001 From: Shackra Date: Mon, 16 Apr 2012 11:50:00 +0200 Subject: [PATCH] Save the MIMEtype to cloudfiles correctly. --- mediagoblin/storage/cloudfiles.py | 6 ++++++ 1 file changed, 6 insertions(+) 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)