I'm building an Angular 8 application that collects user input and 
generates PDF files from it. I'm storing the generated files in a directory 
outside the web root and using a symlink to access them for display on the 
web page using ng2-pdf-viewer, e.g.:

<pdf-viewer [src]="http://localhost:4200/assets/pdfs/my_report.pdf";
></pdf_viewer>

In this URL, "pdfs" is the symlink to the folder where "my_report.pdf" was 
created. However, the file isn't found. If I copy/paste the above URL into 
the browser's location bar, the router treats it as a 404. The odd thing 
is, if I stop ng and restart it, then the URL works as expected. It appears 
that Angular is caching the state of the assets directory at start-up and 
not recognizing any new files added to it. I've spent a couple of hours 
searching for an explanation of this and the right way to handle such 
situations but came up empty. Does anyone here know if assets is cached or 
indexed on startup, and if so is there a way to force it to reload/reindex 
it when new files are added? If not, where is the proper place to store 
files created on the fly and how does one tell the router where to find 
them? Thank you.


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/01b4603b-f8c1-4ccb-b03f-95d46ea26105%40googlegroups.com.

Reply via email to