Supertest: Attach an array of files

Created on 22 Oct 2015  路  1Comment  路  Source: visionmedia/supertest

attach method does not accept arrays, so what can be the best way to upload multiple files.

I tried this so far

.attach('logo[0]', <filepath>)
.attach('logo[1]', <filepath>)

but it ends up in multiple files with different keys

Most helpful comment

this should work:

.attach('logo', <filepath>)
.attach('logo', <filepath>)

>All comments

this should work:

.attach('logo', <filepath>)
.attach('logo', <filepath>)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

bookercodes picture bookercodes  路  5Comments

hacker0limbo picture hacker0limbo  路  3Comments

NBNARADHYA picture NBNARADHYA  路  4Comments

UniverseHan picture UniverseHan  路  4Comments

nazreen picture nazreen  路  3Comments