mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-04-22 16:51:38 +00:00
Make file extension checks case-insensitive in pipeline
This commit is contained in:
parent
3fda82e39d
commit
3f876fabb0
@ -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: {} ({})",
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user