2
after searching on allowedMimeTypes I found following information
replacing below code
if (count($this->allowedMimeTypes) > 0 && !in_array($this->mediaType, $this->allowedMimeTypes)) {
with
if (count($this->allowedMimeTypes) == 0 && !in_array($this->mediaType, $this->allowedMimeTypes)) {
worked