File uploads can have a custom content-type if created as stream parameter

I needed an adjustable content-type for uploads to a server that needs the uploaded content-type of the files to be correct. So I patched the code.