Some fixes and improovements for datastream uploads.

Not really concerned, more of an "FYI", but this could be `@return string[]`... Since mimetypes are strings, right?... Anyway... Yeah. *mumble*