@Override
public int getMaxUploadSize() {
int unlimited = -1;
/* It doesn't look like we can determine which store will be used here, so we'll go with the default
* (It looks like the collection or study involved is available where this method is called, but the SwordConfiguration.getMaxUploadSize()
* doesn't allow a parameter)
*/
Long maxUploadInBytes = systemConfig.getMaxFileUploadSizeForStore("default");
if (maxUploadInBytes == null){
// (a) No setting, return unlimited
return unlimited;
}else if (maxUploadInBytes > Integer.MAX_VALUE){
// (b) setting returns the limit of int, return max int value (BUG)
return Integer.MAX_VALUE;
}else{
// (c) Return the setting as an int
return maxUploadInBytes.intValue();
}
}
For now this is a placeholder issue. Today @landreev @scolapasta and I were talking about how in practical terms, files are limited to 2 GB when uploading to Dataverse via SWORD because getMaxUploadSize returns an
int.Below is the code from https://github.com/IQSS/dataverse/blob/v5.9/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/SwordConfigurationImpl.java#L123-L146
To summarize: