Hi @ayushmishra07 ,
Thanks for the solution, I have tried overlaying the same from /libs but I could not be able to hide it. Please find the screenshot for the reference, let me know if I have missed anything

Hi @anudeep_kumar ,
You are adding the expression inside the render condition, you'll need to create a new node similar to other nodes like main asset and not and add these details over there.

Validated this with PDF works well.
PS :- You'll need to overlay the assetdetails component in place of asset component as this solution will work on the assetdetails page because that's where the url i.e requestPathInfo includes the file path.
eg : URL of assetdetails : http://localhost:7502/assetdetails.html/content/dam/pwa/sample.pdf
If you want to achieve the functionality on assetdetails page as well as asset page, you can hide the quick publish feature completely from assets page by removing it from the overlaid component, that'll mean that user can publish an asset only from the assetdetails page and on the assetdetails page you can add this render condition to hide it, if your file is of PDF format.