visionmedia/superagent — pull request #286 by chris-rock (2013-11-10 16:57:57+00:00)
Title: Feature/contentdisposition

I use a java servlet as a server that takes post request with images. It uses Apache Commons FileUpload. Multiple java libraries depend on this lib. Currently this lib does not support a request like

```
Content-Disposition: attachment; name="file"; filename="basketball.png"
Content-Type: image/png
```

Instead it only accepts requests like

```
Content-Disposition: form-data; name="file"; filename="basketball.png"
Content-Type: image/png
```

With my addon, we are be able to overwrite the default `attachment` with `form-data`. Default remains `attachment`. A sample request would look like

```javascript
var request = require('superagent');
request
.post('http://localhost:8080/upload')
.attach('file', '/path/basketball.png', 'basketball.png', 'form-data')
.end(function(err, res) {
if (!err && res.ok) {
console.log('yay got ' + JSON.stringify(res.body));
} else {
console.log('Oh no! error ');
}
});
```