nodejitsu/node-cloudfiles — Issue #22: addFile needs content-length?
Author: anthonywebb
Created: 2011-12-06 17:19:01+00:00
State: open

I'm trying to get a simple file to updload but am seeing an issue:
``` javascript
{ stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'Cannot upload file without `content-length` header' }
```
Here is the simple code to post the file:
``` javascript
cloud.setAuth(function () {
cloud.addFile('avatars', { remote: photoname, local: './uploads/temp.jpg' }, function (err, uploaded) {
if(err){
console.log(err);
}
else {
console.log(uploaded);
}
});
});
```
Likely something small but I cant see to make it work?

Node is v 4.12