-1

In my Lotus Notes web application, I have file upload functionality. Here I want to validate the attachment file size before uploading which I did through webquerysave. My problem is that whenever the attached file size exceeds the limitation, which is configured in server document, it throws the server error page like “HTTP: 500 Invalid POST Request Exception”.

I tried some methods to resolve this, but they’re not working:

  1. In domcfg.nsf, I mapped the target form called "CustomGeneralErrorForm".
  2. I created "$$ReturnGeneralError" from to show error page.
  3. In Notes.ini, I added "HTTPMultiErrorPage=/error.html"

How can I resolve this issue?

alexwlchan
  • 5,699
  • 7
  • 38
  • 49

1 Answers1

0

I suppose there's no way. I've tried several time to catch that error but I think the only way is to test files size with javascript; Obviously it works only with html5 browsers as you can find in this post: Using jQuery, Restricting File Size Before Uploading

So... you have to write code to detect browser features and use javascript code with html5 browser and find alternative ways for old browser. For example you can use Flash plugin and post tu server-side code depending on your backend. Uploadify is a very good chance (http://www.uploadify.com/) to work just one time, but make a internet search and choose the best for you.

In this way you can stop user large posts, but if you need to upload large size file (>10Mb default) you must set a secondary internet site server document with greater post size limit.

Community
  • 1
  • 1
IntroSnow
  • 31
  • 4