mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-23 16:05:09 +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
|
// 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: {} ({})",
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user