Revision: 4187
Author: seba.wagner
Date: Sun Sep 4 08:34:14 2011
Log: Minimalistic fix for the default DEFAULT_MAX_UPLOAD_SIZE
http://code.google.com/p/openmeetings/source/detail?r=4187
Modified:
/trunk/singlewebapp/src/app/org/openmeetings/utils/ImportHelper.java
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/utils/ImportHelper.java
Sun Sep 4 06:59:47 2011
+++ /trunk/singlewebapp/src/app/org/openmeetings/utils/ImportHelper.java
Sun Sep 4 08:34:14 2011
@@ -8,19 +8,22 @@
public class ImportHelper {
private static final org.slf4j.Logger log = Red5LoggerFactory.getLogger(
ImportHelper.class,
ScopeApplicationAdapter.webAppRootKey);
- public static final int DEFAULT_MAX_UPLOAD_SIZE = 1024 * 1024 * 1024;
//1GB
-
- public static final int getMaxUploadSize(Configurationmanagement
cfgManagement) {
+ public static final int DEFAULT_MAX_UPLOAD_SIZE = 1024 * 1024 * 1024; //
1GB
+
+ public static final int getMaxUploadSize(
+ Configurationmanagement cfgManagement) {
return getMaxUploadSize(cfgManagement, 3L);
}
-
- public static final int getMaxUploadSize(Configurationmanagement
cfgManagement, Long userLevel) {
- Configuration cfg = cfgManagement.getConfKey(userLevel,
"cfgManagement");
+
+ public static final int getMaxUploadSize(
+ Configurationmanagement cfgManagement, Long userLevel) {
+ Configuration cfg = cfgManagement.getConfKey(userLevel,
+ "DEFAULT_MAX_UPLOAD_SIZE");
int result = DEFAULT_MAX_UPLOAD_SIZE;
if (cfg != null) {
String val = cfg.getConf_value();
try {
- result = (int)Math.min(Long.parseLong(val),
(long)Integer.MAX_VALUE);
+ result = (int) Math.min(Long.parseLong(val),
Integer.MAX_VALUE);
} catch (Exception e) {
log.error("Invalid value saved for maxUploadSize:
" + val, e);
}
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.