Xpages - file upload

Hi,

I have the following setup on a dev server:

  • Maximum size of request content: 10240 kb

  • Maximum POST data: 20240 kb

  • Application File upload max size: 1025 kb

After some testing I’ve found the following:

  • if the post request/attachment size is over the “Maximum size of request content” (Internet Protocols - HTTP - HTTP Protocol Limits) setting then you get a page 404 immediately without any exceptions on the server

  • if the post request is below “Maximum size of request content” but is over the “Maximum POST data” (Internet Protocols - Domino Web Engine - POST Data) setting then after a short wait time you get a page 404 and an exception (Invalid POST request exception)

  • if the post request is below both the above settings (so it gets to the XSP/Xpages engine) but it’s over the application File Upload maximum size then you’ll get a validation error message in the application

It seems that the request goes to the HTTP server to check the limits and if it’s fine then it gets to the XPages enginge (with that you’ll get the above nasty error pages).

Setting the limits to 0 is not really an option, because we don’t want to allow unlimited sized posts.

We could configure domcfg to reply with a customized error page (or create a DSAPI filter), but it would be a server wide error page.

Is there any way to get around this problem and provide an application (or component) specific error message?

There are no WQS agents anymore :slight_smile:

Thanks,

Tibor

Subject: File Upload maximum size

Where is this “File Upload maximum size” property ??? I can’t find mention of it in the help files, and it is only alluded to in posts.

How would someone navigate to it?

thx

Subject: In the Application Properties

In the application properties. XPages tab.

Subject: error message upload control

hi tiborI had the same question. I found the solution here:

http://www.bleedyellow.com/blogs/XPagesStuff/tags/xpages?sortby=2&maxresults=50&lang=de_de

You can display an error message by adding a ‘Display Errors’ control to your XPage. If the File Size exceeds the limit set in the server document, an error message like this will be displayed:

"Unaccepted File Size: (70016Kb) Exceeds Size Limit (10240Kb) "