Uploading files with superagent in the browser
Sending files in the browser using XHR can give the user a great experience. I like to use superagent for sending requests, it’s a great light-weight API which doesn’t require other third party libraries and works great when bundling with CommonJS.
Uploading files using a multipart requests in the browser is sadly not supported through their API at the moment, but it’s possible following a few short steps. I’ll explain how I got multipart uploading to work using superagent in the browser in this article.