Exposed the upload API for XHR

Fixes #40