logo

Response

« Return to the main article

You are viewing this page out of context. To see it in the context it is intended please click here.

About This Page

Reply posted by S Hu on Wed 13 Feb 2008 in response to Controlling the Size of Uploaded Files

To not save the doc...

I'm doing my first web app with Notes, which involves dblookup (thanks to
prototype.js and AJAX! =) ) and attachments.


This is a great solution!


I didn't like the fact that the doc still gets saved if the file size exceeds
the limit, so I added a computed field with the value:


@SetHTTPHeader("Expires";0)


and in the WQS agent, I mod it so that it adds the total files being uploaded
(I have 5 File Upload Controls) and if the total exceeds the limit, then I
return a "/FileSize?OpenForm" page where I think have a history.back(-1).


This will then allow the user to go back to the previous page without losing
any text that the user has typed in.... and the doc isn't saved in the back in
too :)


I hope this info helps others.