forwardemail / forwardemail/superagent
url pdf file with filename attached put request
Open
- Dominant language
- JavaScript
- Stars
- 16.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
i have a pdf file url. i need to send it with superagent with fileName param. is there example of this?
this is not working
```
const urlf = 'http://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf';
const s = await http.get(urlf, (stream) => {
return stream;
});
let req = superagent
.put(`${url}/attachFile`)
.auth(apiUserName, password)
req.attach('fileName', "dummy.pdf");
req.pipe(s)
.end(() => {
console.log("attachement upload")
})
```
Contributor guide
Assessment
This issue has not been assessed yet.