fix max size issue

This commit is contained in:
Anthony Stirling 2023-08-31 13:52:54 +01:00
parent ff7f089f69
commit 01f7f1f59c
4 changed files with 4 additions and 14 deletions

View file

@ -181,7 +181,6 @@ system:
googlevisibility: false # 'true' to allow Google visibility, 'false' to disallow
rootPath: / # Set the application's root URI (e.g. pdf-app for http://localhost/pdf-app)
customstaticFilePath: '/customFiles/static/' # Directory path for custom static files
maxFileSize: 2000 # Set the maximum file size in MB
ui:
homeName: # Application's visible name

View file

@ -51,7 +51,7 @@ public class SPdfApplication {
SpringApplication app = new SpringApplication(SPdfApplication.class);
app.addInitializers(new ConfigInitializer());
if (Files.exists(Paths.get("configs/settings.yml"))) {
app.setDefaultProperties(Collections.singletonMap("spring.config.location", "file:configs/settings.yml"));
app.setDefaultProperties(Collections.singletonMap("spring.config.additional-location", "file:configs/settings.yml"));
} else {
System.out.println("External configuration file 'configs/settings.yml' does not exist. Using default configuration and environment configuration instead.");
}

View file

@ -1,12 +1,5 @@
spring.http.multipart.max-file-size=${MAX_FILE_SIZE:2000MB}
spring.http.multipart.max-request-size=${MAX_FILE_SIZE:2000MB}
multipart.enabled=true
multipart.max-file-size=${MAX_FILE_SIZE:2000MB}
multipart.max-request-size=${MAX_FILE_SIZE:2000MB}
spring.servlet.multipart.max-file-size=${MAX_FILE_SIZE:2000MB}
spring.servlet.multipart.max-request-size=${MAX_FILE_SIZE:2000MB}
server.forward-headers-strategy=NATIVE
@ -20,6 +13,8 @@ server.error.include-message=always
#logging.level.org.springframework=DEBUG
#logging.level.org.springframework.security=DEBUG
spring.servlet.multipart.max-file-size=2000MB
spring.servlet.multipart.max-request-size=2000MB
server.servlet.session.tracking-modes=cookie
server.servlet.context-path=${SYSTEM_ROOTURIPATH:/}
@ -36,7 +31,6 @@ spring.resources.static-locations=file:customFiles/static/
#spring.thymeleaf.prefix=file:/customFiles/templates/,classpath:/templates/
#spring.thymeleaf.cache=false
spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa

View file

@ -14,9 +14,6 @@ system:
googlevisibility: false # 'true' to allow Google visibility, 'false' to disallow
rootURIPath: / # Set the application's root URI (e.g. /pdf-app)
customStaticFilePath: '/customFiles/static/' # Directory path for custom static files
maxFileSize: 2000 # Set the maximum file size in MB
connectionTimeoutMinutes: 5m
connectionTimeoutMilliSeconds: 300000
#ui:
# appName: exampleAppName # Application's visible name