Project

General

Profile

« Previous | Next » 

Revision 9099

Modify v1 and v2 calls to MultipartRequestResolver to use MAX_UPLOAD_SIZE from configuration.

View differences:

src/edu/ucsb/nceas/metacat/restservice/v1/MNResourceHandler.java
1425 1425
		File tmpDir = getTempDirectory();
1426 1426
		logMetacat.debug("temp dir: " + tmpDir.getAbsolutePath());
1427 1427
		MultipartRequestResolver mrr = 
1428
			new MultipartRequestResolver(tmpDir.getAbsolutePath(), 1000000000, 0);
1428
			new MultipartRequestResolver(tmpDir.getAbsolutePath(), MAX_UPLOAD_SIZE, 0);
1429 1429
		MultipartRequest mr = null;
1430 1430
		try {
1431 1431
			mr = mrr.resolveMultipart(request);
src/edu/ucsb/nceas/metacat/restservice/v2/MNResourceHandler.java
1463 1463
		File tmpDir = getTempDirectory();
1464 1464
		logMetacat.debug("temp dir: " + tmpDir.getAbsolutePath());
1465 1465
		MultipartRequestResolver mrr = 
1466
			new MultipartRequestResolver(tmpDir.getAbsolutePath(), 1000000000, 0);
1466
			new MultipartRequestResolver(tmpDir.getAbsolutePath(), MAX_UPLOAD_SIZE, 0);
1467 1467
		MultipartRequest mr = null;
1468 1468
		try {
1469 1469
			mr = mrr.resolveMultipart(request);
src/edu/ucsb/nceas/metacat/restservice/D1ResourceHandler.java
82 82
    public static final byte HEAD = 5;
83 83

  
84 84
	/** Maximum size of uploads, defaults to 1GB if not set in property file */
85
	private static int MAX_UPLOAD_SIZE = 1000000000;	
85
	protected static int MAX_UPLOAD_SIZE = 1000000000;
86 86

  
87 87
    /*
88 88
     * API Resources

Also available in: Unified diff