forwardemail / forwardemail/supertest
Attaching buffer for multipart forms
Open
- Dominant language
- JavaScript
- Stars
- 14.4k
- Forks
- 782
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to test file uploads, and it works when having a path to the file. Here, the file is 10MB, and I get the 'file too large' error on the backend server as expected. But if I try using a Buffer instead of the same size 10MB, there's no file too large error. Am I using Buffers in the right way in multipart forms here?
```js
// works
.attach('file', pathToFile)
// doesn't work
.attach('file', Buffer.from('a'.repeat(10000000)))
```
Contributor guide
Assessment
This issue has not been assessed yet.