Revision 1617
Added by Jing Tao over 21 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
2112 | 2112 |
|
2113 | 2113 |
Hashtable params = new Hashtable(); |
2114 | 2114 |
Hashtable fileList = new Hashtable(); |
2115 |
int sizeLimit = (new Integer(MetaCatUtil.getOption("datafilesizelimit"))) |
|
2116 |
.intValue(); |
|
2117 |
MetaCatUtil.debugMessage("The limit size of data file is: "+sizeLimit, 50); |
|
2115 | 2118 |
|
2116 | 2119 |
try { |
2117 | 2120 |
// MBJ: need to put filesize limit in Metacat config (metacat.properties) |
2118 |
MultipartParser mp = new MultipartParser(request, 200*1024*1024); //200MB
|
|
2121 |
MultipartParser mp = new MultipartParser(request, sizeLimit*1024*1024);
|
|
2119 | 2122 |
Part part; |
2120 | 2123 |
while ((part = mp.readNextPart()) != null) { |
2121 | 2124 |
String name = part.getName(); |
Also available in: Unified diff
Get the file size limit from property rather than hard code.