nodejitsu/node-cloudfiles — Issue #27: Content type not getting sent correctly for .webm files
Author: MeanwhileMedia
Created: 2011-12-19 22:31:13+00:00
State: open

I apologize for my repeat issue posts, but I have been having a lot of trouble with this module. Whether I set the content-type manually, or let the mime module do it for me, webm files still get stored as 'application/octet-stream' and will will therefore download, instead of play in browser (tested on firefox, and chrome).

My code (in case I'm missing something simple):

```javascript
var upOpts = {
headers: {
'content-type': 'video/webm',
},
remote: newFilename,
local: path
};

cloudClient.addFile(Container.name, upOpts, function (err, uploaded) {
if (err) { console.log('Error uploading '+path+': ' + err); }
});
```

I originally had my app written in PHP and I needed to set both $object->metadata, and $object->content_type with the proper content-type. Is there a way to set the metadata with this module?