diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java index 39ca6937..6529c932 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java @@ -33,8 +33,8 @@ public class ApiDocService { return userService.getApiKeyForUser(Role.INTERNAL_API_USER.getRoleId()); } - @EventListener(ApplicationReadyEvent.class) - private void loadApiDocumentation() { + //@EventListener(ApplicationReadyEvent.class) + private synchronized void loadApiDocumentation() { try { HttpHeaders headers = new HttpHeaders(); String apiKey = getApiKeyForUser(); @@ -67,6 +67,9 @@ public class ApiDocService { } public boolean isValidOperation(String operationName, Map parameters) { + if(apiDocumentation.size() == 0) { + loadApiDocumentation(); + } if (!apiDocumentation.containsKey(operationName)) { return false; } diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java index 6d12789e..a211d379 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java @@ -332,7 +332,6 @@ public class PipelineController { String apiKey = getApiKeyForUser(); headers.add("X-API-Key", apiKey); - headers.setContentType(MediaType.MULTIPART_FORM_DATA); HttpEntity> entity = new HttpEntity<>(body, headers); diff --git a/src/main/resources/templates/pipeline.html b/src/main/resources/templates/pipeline.html index 6e121efb..51caf186 100644 --- a/src/main/resources/templates/pipeline.html +++ b/src/main/resources/templates/pipeline.html @@ -77,7 +77,7 @@
  • For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users
  • -

    How to use config for folder scanning

    +

    How to use pre-load configs in web UI