Make file extension checks case-insensitive in pipeline

This commit is contained in:
Muratcan Yeldan 2025-04-17 01:11:17 +03:00
parent 3fda82e39d
commit 3f876fabb0
2 changed files with 7 additions and 3 deletions

View File

@ -208,7 +208,8 @@ public class PipelineDirectoryProcessor {
// Check against allowed extensions
boolean isAllowed =
allowAllFiles
|| inputExtensions.contains(extension);
|| inputExtensions.contains(
extension.toLowerCase());
if (!isAllowed) {
log.info(
"Skipping file with unsupported extension: {} ({})",

View File

@ -112,7 +112,8 @@ public class PipelineProcessor {
for (Resource file : outputFiles) {
boolean hasInputFileType = false;
for (String extension : inputFileTypes) {
if ("ALL".equals(extension) || file.getFilename().endsWith(extension)) {
if ("ALL".equals(extension)
|| file.getFilename().toLowerCase().endsWith(extension)) {
hasInputFileType = true;
MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();
body.add("fileInput", file);
@ -166,7 +167,9 @@ public class PipelineProcessor {
.filter(
file ->
finalinputFileTypes.stream()
.anyMatch(file.getFilename()::endsWith))
.anyMatch(
file.getFilename().toLowerCase()
::endsWith))
.toList();
}
// Check if there are matching files