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):

7 comments:

Unknown 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

Unknown said...

Hi i Added in the web.xml but still same ,not able to upload morethan 2mb,pls help me


org.apache.myfaces.trinidad.UPLOAD_MAX_FILE_SIZE
20971520

Anonymous said...

I do not think it supports large files. It is not handling even 35MB file in spite of having respective setting is done in web.xml. I have no idea how very large file such as 50GB and can be uploaded when the small file itself failing. We have requirement to upload larger file such as 50 GB in size. I need to suggest proper technology before I say Oracle UCM

Anonymous said...

Ok..I figured out why issue with smaller files...the web session is getting timed out...Now I understand why we can not upload huge files.

Aditya Sant said...

May I know what is the File size limit of Oracle UCM (ma be 10 g/11 g)? Is it 2GB ?

Anonymous said...

ADD



org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY

5368709120





org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE

5368709120

to web.xml
into ur project