From bea27c73d82033633c0b8b319a047ac7ef268aeb Mon Sep 17 00:00:00 2001 From: Mohammad Ghazanfar Ali Danish <62088117+mdanish98@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:51:01 +0100 Subject: [PATCH] Adds documentation for max-file/request size (#251) * Adds documentation for max-file/request size Signed-off-by: Mohammad Ghazanfar Ali Danish * Corrects syntax Signed-off-by: Mohammad Ghazanfar Ali Danish --------- Signed-off-by: Mohammad Ghazanfar Ali Danish --- basyx.aasenvironment/Readme.md | 6 ++++++ .../src/main/resources/application.properties | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/basyx.aasenvironment/Readme.md b/basyx.aasenvironment/Readme.md index d1f6a1286..889a3ec6c 100644 --- a/basyx.aasenvironment/Readme.md +++ b/basyx.aasenvironment/Readme.md @@ -47,5 +47,11 @@ AAS environments (e.g. XML, JSON, AASX) can be uploaded by a multipart/form-data The upload follows the same rules as the preconfiguration in terms of handling existing AAS, submodels and concept descriptions. In order for the file to be recognized correctly, please make sure that its MIME type is properly configured. +**Note** +If the AAS Environment file (XML, JSON, or AASX) size exceeds the below mentioned default limit, it is important to set the below two properties in the application.properties based on the size of the file to be uploaded: + + spring.servlet.multipart.max-file-size (default 1 MB) + spring.servlet.multipart.max-request-size (default 10 MB) + ## AAS Environment Features * [AAS Environment Authorization](basyx.aasenvironment-feature-authorization) diff --git a/basyx.aasenvironment/basyx.aasenvironment.component/src/main/resources/application.properties b/basyx.aasenvironment/basyx.aasenvironment.component/src/main/resources/application.properties index 10cd8d383..a0531b2ad 100644 --- a/basyx.aasenvironment/basyx.aasenvironment.component/src/main/resources/application.properties +++ b/basyx.aasenvironment/basyx.aasenvironment.component/src/main/resources/application.properties @@ -44,4 +44,18 @@ basyx.backend = InMemory #################################################################################### # This feature is enabled by default -#basyx.submodelrepository.feature.operation.delegation.enabled = false \ No newline at end of file +#basyx.submodelrepository.feature.operation.delegation.enabled = false + +#################################################################################### +# Max File Size +#################################################################################### +# To define the maximum size of file to be uploaded in a request (default 1 MB) + +# spring.servlet.multipart.max-file-size=128KB + +#################################################################################### +# Max Request Size +#################################################################################### +# To define the total request size for a multipart/form-data (default 10 MB) + +# spring.servlet.multipart.max-request-size=128KB \ No newline at end of file