Using attach() and send() on the same request results in a parse error from Formidable. Seems to be related to boudary token somehow. Maybe I'm holding it wrong. I was unable to make a proper multipart request - file uploads only worked when not using send().
I think what your looking for is .field()
request(app)
.post('/')
.field('foo', 'bar')
.attach('text', __dirname + '/fixtures/data.txt')
.end(done);
Check out "field values" on the superagent docs. http://visionmedia.github.io/superagent/#multipart-requests
Most helpful comment
I think what your looking for is
.field()Check out "field values" on the superagent docs. http://visionmedia.github.io/superagent/#multipart-requests