In the community it will openup in a new window for this code and i didnt find a way to pop-up in the same window as it shows in the internal salesforce org :(
`this[NavigationMixin.Navigate]({
type: 'standard__webPage',
attributes: {
url: DistributionPublicUrl
}
});`
and this below approaches we take us to the detail page of contentDocument in the new tab when we try to open in community
`this[NavigationMixin.Navigate]({
type: 'standard__namedPage',
attributes: {
pageName: 'filePreview'
},
state : {
selectedRecordId: file.ContentDocumentId
}
})`
this[NavigationMixin.Navigate]({
type: 'standard__namedPage',
attributes: {
pageName: 'filePreview'
},
state : {
selectedRecordId: file.ContentDocumentId
}
})