Is it possible to prevent file upload, with the Web Input Filename Widget, when the size of the file is greater than a specified value?

Is it also possible to limit the file upload to a certain file specific formats, like pdf, jpg, txt and doc?

Thank you.

Hello Alexandre


You can prevent the upload of files above a given size by using the maxRequestLength property in the httpRuntime element in the eSpace web.config (http://msdn.microsoft.com/en-us/library/e1f13641(VS.80).aspx). This will apply to all Upload File widgets in the eSpace. You can use the Service Center Factory Configuration component to create the custom rule and apply it to one or more eSpaces.


As for the other question, I believe that there is no way to restrict upload of files that are not of a given type/extension - that validation must be made server-side, after the file has been uploaded.

Hi Acácio.

Thank you for your reply.

I wonder if it is possible other way, because I have several aplications running in the same server, with diferent needs.
If I do as you say, all the aplications will have tha limitation and what I want is to, independently, configure the upload limit for each one.

Thank you.

Try using this extension, with it you can test the file you got from the user to check its size, like this:

Hope it helps!
Hi Hermínio.

Thank you for your solution, it save my day. That worked just fine.


Hi all..
i want to asked i tried to used this function BinaryDataSize(SelectFilename1.Content)  in outsystems P9 but it deprecated and i cant use that function.

can somebody help for read size when upload file?

thank u