Skip to content

Commit

Permalink
fix #2842 Add http.fileupload.max.file.count property and refactor fi…
Browse files Browse the repository at this point in the history
…le upload handling logic
  • Loading branch information
marevol committed Sep 8, 2024
1 parent e765752 commit 9ac9f96
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 108 deletions.
27 changes: 27 additions & 0 deletions src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
/** The key of the configuration. e.g. 262144 */
String HTTP_FILEUPLOAD_THRESHOLD_SIZE = "http.fileupload.threshold.size";

/** The key of the configuration. e.g. 10 */
String HTTP_FILEUPLOAD_MAX_FILE_COUNT = "http.fileupload.max.file.count";

/** The key of the configuration. e.g. groovy */
String CRAWLER_DEFAULT_SCRIPT = "crawler.default.script";

Expand Down Expand Up @@ -2646,6 +2649,21 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
*/
Integer getHttpFileuploadThresholdSizeAsInteger();

/**
* Get the value for the key 'http.fileupload.max.file.count'. <br>
* The value is, e.g. 10 <br>
* @return The value of found property. (NotNull: if not found, exception but basically no way)
*/
String getHttpFileuploadMaxFileCount();

/**
* Get the value for the key 'http.fileupload.max.file.count' as {@link Integer}. <br>
* The value is, e.g. 10 <br>
* @return The value of found property. (NotNull: if not found, exception but basically no way)
* @throws NumberFormatException When the property is not integer.
*/
Integer getHttpFileuploadMaxFileCountAsInteger();

/**
* Get the value for the key 'crawler.default.script'. <br>
* The value is, e.g. groovy <br>
Expand Down Expand Up @@ -8221,6 +8239,14 @@ public Integer getHttpFileuploadThresholdSizeAsInteger() {
return getAsInteger(FessConfig.HTTP_FILEUPLOAD_THRESHOLD_SIZE);
}

public String getHttpFileuploadMaxFileCount() {
return get(FessConfig.HTTP_FILEUPLOAD_MAX_FILE_COUNT);
}

public Integer getHttpFileuploadMaxFileCountAsInteger() {
return getAsInteger(FessConfig.HTTP_FILEUPLOAD_MAX_FILE_COUNT);
}

public String getCrawlerDefaultScript() {
return get(FessConfig.CRAWLER_DEFAULT_SCRIPT);
}
Expand Down Expand Up @@ -11066,6 +11092,7 @@ protected java.util.Map<String, String> prepareGeneratedDefaultMap() {
defaultMap.put(FessConfig.HTTP_PROXY_PASSWORD, "");
defaultMap.put(FessConfig.HTTP_FILEUPLOAD_MAX_SIZE, "262144000");
defaultMap.put(FessConfig.HTTP_FILEUPLOAD_THRESHOLD_SIZE, "262144");
defaultMap.put(FessConfig.HTTP_FILEUPLOAD_MAX_FILE_COUNT, "10");
defaultMap.put(FessConfig.CRAWLER_DEFAULT_SCRIPT, "groovy");
defaultMap.put(FessConfig.CRAWLER_HTTP_thread_pool_SIZE, "0");
defaultMap.put(FessConfig.CRAWLER_DOCUMENT_MAX_SITE_LENGTH, "100");
Expand Down
Loading

0 comments on commit 9ac9f96

Please # to comment.