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 // Check against allowed extensions
boolean isAllowed = boolean isAllowed =
allowAllFiles allowAllFiles
|| inputExtensions.contains(extension); || inputExtensions.contains(
extension.toLowerCase());
if (!isAllowed) { if (!isAllowed) {
log.info( log.info(
"Skipping file with unsupported extension: {} ({})", "Skipping file with unsupported extension: {} ({})",

View File

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