Hi all,
I’ve searched and searched and I just seem to be going in circles so I would really appreciate a pointer in the right direction from anyone that might know.
Basically my scenario is that I want a user to be able to select a file on his local filesystem (essentially a .txt file with a list of keys) and upload that to my Domino server via a web form. When submitted, some output is generated using the file to look up documents in a database and then returned to the user via the web.
I’ve set up a form with a file upload control accessible via the web, but as I’ve no desire to save this form, I’ve hit a wall.
My sticking point is how to get the file onto my Domino server for processing? I’ve seen various references to WebQuerySave to trigger an agent to save the attachment but I’ve no desire to save the file anywhere (unless I have to temporarily) but crucially no document in the database to attach it to, so I’m having trouble getting my head around the steps required.
Any pointers gratefully received!
Subject: Upload a .txt file and process it via the Web
I think you won’t have the choice to save the document… if you want to process a file
you mustuse the WebQuerySave agent
Extract the file to a temp dir
Open the file for process
from the Result set Build your HTML return page (using Print )
then delete the local file
You may at the end of the process set a SaveOptions field to “0” so your document will not be save
all this process is resource consuming and require a STRICT Error handling and Timeout control
–What if the users close the browser
-What the file get caucht by a Anti-virus Agent and is look
-…
my suggestion (for better performance) is to use the upload document and had a text field (hidden on NewDoc)
extract the file (same as in previous scenario)
Process and buld you result to be return in this Field (instead of directly to the browser)
and the return to the Document in ReadMode … with the field visible now
you may event send an email to the user with the link to the result in case of a time-out …
then build a agent to clean up the DB (delete document) once a day !!
as you can see it can be very tricky to process live-upload
Subject: Upload a .txt file and process it via the Web
YOu can store temporarly then you can remove after your process . am i correct?
if you don’t want . then read file using javascript then sent to domino server using AJAX.