I have a web application that shows a pdf file in an iframe
the pdf that I show in the iframe I look for them in a specific route, I show it to the user so he can decide if he wants to substitute another one or not.
If you want to replace it simply press a button and the application replaces it with another one.
The problem is that trying to replace it tells me that the file is in use.
It does not help me to save it with another name because several departments within the company look for it by route and name, if I change the name they will not see it.
The iframe is this:
<iframe id='frameBefore' src="404.aspx" width="500" height="400" style="position: relative; width: 30%"></iframe>
The Copy I do from C #:
File.Copy(rutaArchivo, RUTA_COPIA_LOCAL,true);
The simplest solution would be to open the pdf in the iframe in a 'non-exclusive' way but I have not managed to do it.
Another option would be before displaying the pdf, save it in another route and show that copy in the iframe ... but not from javascript (I would have to do it from javascript because it's where I send the route to iframe)