webodf / ViewerJS

ViewerJS: Document Reader in JavaScript
http://viewerjs.org
1.94k stars 422 forks source link

ViewerJS with Angular front end and ASP.Net Core as Middle Tier Web API #307

Open amulu06 opened 1 year ago

amulu06 commented 1 year ago

Hi, I have a requirement in our Application which is built using Angular 11 as Front end and API layer on ASP.Net core. Both the Applications are hosted on the same Web Server. I need to show the preview of the documents with in the Attachments function as one of the preview option. Trying to use ViewerJS. I'm not sure about where exactly this ViewerJS need to be copied and how to use it to preview documents. I tried copying this on Angular side under assets folder and also my sample file in the same, but I could not make it load, It just shows blank screen, Also I tried copying the ViewerJS under Middle Tier wwwroot folder with my files under wwwroot\downloads. This also not working. Would you please provide some sample on how to use ViewerJS in the above scenario

Thanks,