Ticket #429: bugfix429.patch

File bugfix429.patch, 919 bytes (added by Jorge Araya Navarro, 12 years ago)

the final patch for this annoying bug. It's a glorious victory, comrades!

  • mediagoblin/storage/cloudfiles.py

    diff -r 23c078e54eef mediagoblin/storage/cloudfiles.py
    a b  
    4242        self.param_host = kwargs.get('cloudfiles_host')
    4343        self.param_use_servicenet = kwargs.get('cloudfiles_use_servicenet')
    4444
     45        # the Mime Type webm doesn't exists, let's add it
     46        mimetypes.add_type("video/webm", "webm")
     47
    4548        if not self.param_host:
    4649            print('No CloudFiles host URL specified, '
    4750                  'defaulting to Rackspace US')
     
    9295
    9396            if mimetype:
    9497                obj.content_type = mimetype[0]
     98                # this should finally fix the bug #429
     99                meta_data = {'mime-type' : mimetype}
     100                obj.metadata = meta_data
    95101
    96102        return CloudFilesStorageObjectWrapper(obj, *args, **kwargs)
    97103