Support for file uploads

r? @wangjohn 
Hmm, I would prefer to have this passed in more explicitly, like for instance if the api resource had a class that did an override over the default apiBase (similar to how `className` works). I think this makes it easier to keep track of things, as you don't have to update `$apiUploadPaths` whenever you update a class name. It also makes things more explicit, which is nice.