dimanche 2 juin 2019

how to preview local files in the browser in another html page

i am looking for a creative solution for a new task. my issue is we need a way to preview local files (extentions: doc, docx, ppt, pptx, pdf, tif, jpeg) in a frame or so of a different web page which provides a link. we would like to prevent parsing the files to pdf in order to save time...

we are using angular 7, c# asp.net server side. we are very limitted in most solutions, as the data is very secure and is used in an inner office net, that is why we can't use the google docs solution. i also understood that using iframe tag and pointing it src attribute to the file source doesn't load the page due to security resones. in addition all users has the ability to preview the above files types when they do it straight from the document by the open with -> IE or other browsers options.

i tried :

<iframe src="file:///C:/Users/cd/Downloads/MyFile.docx"></iframe>

but: the iframe tag doesn't open the doc file, i can see the iframe in the DOM as a new html but it doesnt have a content of anything i tried also for images and the same, the frame is blank




Aucun commentaire:

Enregistrer un commentaire