Bugfix #1099.

Details:
- bugfix #1099;
- improved getMimeType API call.


__Link to code review:__ http://mrccodereview.cloudapp.net/ui#review:id=6323