protected function setType($type)
    {
        if ($type == '*/*' || $type == 'application/octet-stream')
        {
            $type = \Module\HttpFoundation\getMimeTypeOfFile($this->getTmpName(), false);
            if ( empty($type) )
                if ( null !== $solved = \Module\HttpFoundation\getMimeTypeOfFile($this->getClientFilename()) )
                    $type = $solved;
                else
                    $type = 'application/octet-stream';
        }

        $this->type = (string) $type;
        return $this;
    }