Saturday, December 11, 2010

Oracle UCM 11g - Uploading Large Files from ADF 11g Applications

By default, Oracle ADF 11g application allows to upload maximum 2 MB size files. Oracle WebCenter 11g Content Management ADF Task Flows inherit the same configuration from ADF settings. I will explain how to increase maximum file size and upload larger files into Oracle Content Server 11g.

For sample application I have increased maximum file size to 20 MB, you can download it from here - UCMNewFolderLarge.zip.

Let's test default file upload settings of 2 MB maximum and try to upload 15 MB file:


When trying to upload this file, as expected WebCenter Content Management task flow returns The file is too large error:


In order to set larger maximum file size setting, add following parameter into Context Initialization Parameters group of web.xml - UPLOAD_MAX_DISK_SPACE:


This example sets maximum file upload size to 20971520 bytes, or divided by 1024 and one more time by 1024 - 20 MB. Its common mistake, sometimes we keep forgetting to prefix this parameter with Trinidad library reference and not getting expected behavior - still File is Too Large error:


Make sure UPLOAD_MAX_DISK_SPACE parameter is referenced from Trinidad library:


After adjusting maximum file size to 20 MB, 15 MB file is uploaded to Oracle Content Server successfully:


Now I will try to upload 50 MB file:


WebCenter Content Management task flow returns The File is Too Large error and what a surprise - shows correct maximum size limit (20 MB):

2 comments:

rama said...

I wanted to test the maximu limit ADF can handle so I had the above parameters something like this


org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY

512000000



org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE

512000000


Even though I set the limits for 500MB, it is failing with the "File too large" exception for just 80MB file. Is there a unspecified limit beyond which we can not upload?

Anonymous said...

Hi Andrejus,

Thanks, this is very usefull