Some fixes and improovements for datastream uploads.

Heh... also, copy/pasta? These are extensions, not mimetypes. Oh well...