Skip to content

Commit 0b36ceb

Browse files
committed
Switch RubinUploadManagerImpl to use UploadLimits
1 parent 0537bae commit 0b36ceb

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Changed
2+
3+
- Switch RubinUploadManagerImpl to use UploadLimits and set a default filesize limit of 32Mb

tap/src/main/java/ca/nrc/cadc/sample/RubinUploadManagerImpl.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,25 @@
6868
package ca.nrc.cadc.sample;
6969

7070
import ca.nrc.cadc.tap.BasicUploadManager;
71-
71+
import ca.nrc.cadc.tap.upload.UploadLimits;
7272

7373
public class RubinUploadManagerImpl extends BasicUploadManager {
74-
7574
/**
7675
* Default maximum number of rows allowed in the UPLOAD VOTable.
7776
*/
7877
public static final int MAX_UPLOAD_ROWS = 100000;
7978

79+
public static final UploadLimits MAX_UPLOAD;
80+
81+
/**
82+
* Use A filesize limit of 32 Mb using UploadLimits.
83+
*/
84+
static {
85+
MAX_UPLOAD = new UploadLimits(32 * 1024L * 1024L); // 32 Mb
86+
MAX_UPLOAD.rowLimit = MAX_UPLOAD_ROWS;
87+
}
88+
8089
public RubinUploadManagerImpl() {
81-
super(MAX_UPLOAD_ROWS);
90+
super(MAX_UPLOAD);
8291
}
8392
}

0 commit comments

Comments
 (0)