View Full Version : Opening a local Document
dlstrawn
04-07-2010, 10:45 AM
Is there a way to open a local document (.doc or .pdf) from within the Valence Viewport?
richard.milone
04-07-2010, 11:38 AM
The correct answer should be "no" because the browser at a very low level restricts access to local file resources from within the context of a page that's already open. The portal is an open "page" in the browser so it cannot open a local resource. If you tried it by using a file:/// path you would get an Access Restriction message.
Ok, now that I've gotten that out of the way I can also tell you there are ways around this restriction but they're not pretty. The easiest thing to do would be to use an ActiveX control enhancement to the portal that could do anything like start a PC application or open a document like you want. To see how to do that just Google "WScript.Shell ActiveX" and see what you get. Downsides are you can only use IE and you have to modify the portal. There are other options too, like Firefox plugins and such, but they're all a pain to deploy.
So bottom line is the best answer is "no, you can't do it" but the real answer is "yes, you can do it--if you like pain."
richard.milone
04-07-2010, 11:39 AM
Just had another thought...is there any reason you can't put the documents up on the IFS and then link them through the portal? That would work like a charm.
dlstrawn
04-07-2010, 01:42 PM
The problem with putting them on the IFS is that each user could no longer save a Word document to their "my documents" folder, they would now have to also save them to the IFS, which most don't have access to.
I can go to IBM's website, then in the URL type file///C:/.... and it will ask me to open or download the file. There are no access restrictions about which you speak. If I choose to open it, it simply starts open office, or excel and opens the document. I can make changes to it and save it back to its original location on the local PC. That is what I am trying to do in the viewport.
richard.milone
04-07-2010, 02:28 PM
Yes, you are correct, you can type file:/// in the url of your browser and load any local document you want. That is far different from a web page that was opened from a remote resource attempting to link to something on file:///. Browsers do not allow pages that were opened on a remote server to subsequently call something open from the local system. That's considered a massive security hole. If browsers allowed that you might go to your favorite news site and the opening page could have some nice code in there to automatically start accessing stuff on your local system and sending it anywhere it wanted, know what I mean?
The only workarounds that I know of are the ones I mentioned in my previous post. If anyone on the forum knows some other ways please let us know.
dlstrawn
04-08-2010, 09:15 AM
I hear what you are saying. I guess the best thing would be to map a network drive to the IFS and set up a routine to backup the user's "my documents" to the mapped drive. Thanks.
richard.milone
04-08-2010, 09:30 PM
I guess the best thing would be to map a network drive to the IFS and set up a routine to backup the user's "my documents" to the mapped drive. Thanks.
This would sound reasonable. I wonder though, is there any way you can just give each user their own folder in the IFS and have them maintain all their documents directly there?
vBulletin® v3.7.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.