If an UploadIO is passed as a parameter we should use it

The passed in UploadIO can contain a mimetype and we don't want
to lose it.