protected function getType($file)
    {
        $extension = $file->ext();
        if (isset($this->typeMap[$extension])) {
            return $this->typeMap[$extension];
        }

        return $file->mime() ?: 'application/octet-stream';
    }