Update to set mimetype and added detecting mimetype

after updating requests module to 2.1.1, I couldn't upload file jobs. 
so I added mimetype into parameter and detecting function if you don't set it.
@hayate 
I added default mimetype if it can't be guessed..