Accessing Local Files Via Web

Ok. Here’s the problem I face. I have some files locally that I’d like to attach to a document but I don’t want any user intervention in the selection of the files because its supposed to be automatic. Since I’m doing this over the web it poses a problem. If I do it in Lotuscript in a WebQuerySave agent it looks at the directories on the server, not local, and I don’t see a way to change this. If I try and compose a form with precomputed FileUploadControls, they still don’t save without entering the values into the fields manually. I’ve even tried to see if JavaScript can type text in a field, perhaps allowing me to focus on the FileUploadControl field and then type in the value I need to pull…nope…no go.

I’m at my whits end. Does anyone know of a way to access and attach local files via the web without having user intervention? Does anyone know or have some sample code on how one would do this (maybe using a JAVA agent to pull local files), or has anyone done something similar to this? I’m open to any suggestions at this point.

Thanks for your help.

<<<>>>

Subject: Accessing Local Files Via Web

That is specifically disallowed. You might be able to do it with JScript/AxtiveX or with VBScript, but anybody who would allow you to do that should be considered a fool (think about what opening file-system access to the web really means, not for your app, but for more malicious code).

If this is an intranet application running in a Windows-only environment, you might be able to do it if there is an intranet zone policy in place in your org – there’s no guarantee that non-Administrator users would be able to give you the permisssion you need.

Subject: RE: Accessing Local Files Via Web

Thanks Stan. I appreciate your insight. You often post responses that are really good and help the beginner and intermediate notes developer to understand concepts.

This is not one of those cases though. Just to clarify, this app is intranet based and already users at customer site who would need this functionality have their site set as a trusted site. I’d considered delving into the ActiveX side to discover a way to do this, but was hoping for something less involved. Oh well.

I received a reply from Ronoldo Soledade, from Brazil, who provided some VBScript using ActiveX that hopefully will get me in the right direction. Thank you for your response Ronoldo and Stan. Keep up the good work on this forum guys.

In the end, my goal is to offer the ability to import Microsoft Word documents and their inline images into Alan Hurts rich text editor automatically. It’s a great, and free, editor and I’ve been customizing it a lot.

Ronoldo’s code is:

PS: You need set your IE security preferences to accept ActiveX script execution.

Subject: RE: Accessing Local Files Via Web

It’s that PS that’ll be the killer – and that’s why I said that if it’s an intranet app on Windows, a polcy is the way to go. I know I wouldn’t turn on unsigned scripts that invoke ActiveX voluntarily…