forwardemail / forwardemail/superagent

Attaching multiple files to a request fails.

Open
#1,605 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

`const result = await superagent
.post('url')
.attach('driving_license', fs.createReadStream(`filePath`))
.field('dl_number', 'dlInfo.dlNo')
.field('dob', 'dlInfo.dob')
.field('apikey', 'apikey')
.attach('photo', fs.createReadStream(`filePath`));`

Using attach multiple times does not allow the file to get attached.

This on the other hand works-
` await superagent
.post('url')
.field('rc_number', rcInfo.rcNumber)
.field('apikey', 'apiKey')
.attach('rcbook', fs.createReadStream(`filePath`));`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.