So about a month ago I asked a question regarding superagent and sending files, but got no response at all. I would still like to find out how to do this as I enjoy using su
To complete previous answers and provide a reference, check this page: https://visionmedia.github.io/superagent/#multipart-requests
According to it:
When you use .field() or .attach() you can't use .send() and you must not set Content-Type (the correct type will be set for you).
Also, even if this is not the case here, there are many posts/questions where people use the filename as the second argument for .attach
. Again from this doc page:
In browser create a Blob with an appropriate type instead.
This doesn't refer to the second argument, but to a third 'options' one, but to me it implies that filenames are not supported in the browser version.