Added mimetype to determine file extention #28