davsclaus commented on code in PR #12240:
URL: https://github.com/apache/camel/pull/12240#discussion_r1407888757


##########
components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java:
##########
@@ -1142,15 +1194,20 @@ protected CamelServlet createServletForConnector(
         holder.setInitParameter(CamelServlet.ASYNC_PARAM, 
Boolean.toString(endpoint.isAsync()));
         context.addServlet(holder, "/*");
 
-        File file = File.createTempFile("camel", "");
-        boolean result = file.delete();
-        if (!result) {
-            LOG.error("failed to delete {}", file);
+        String location = endpoint.getFilesLocation();
+        if (location == null) {
+            File file = File.createTempFile("camel", "");
+            boolean result = file.delete();
+            if (!result) {
+                LOG.error("failed to delete {}", file);

Review Comment:
   WARN - Also you can use FileUtil.deleteFile from camel-core



##########
components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java:
##########
@@ -1016,6 +1028,46 @@ public void setSendServerVersion(boolean 
sendServerVersion) {
         this.sendServerVersion = sendServerVersion;
     }
 
+    public long getMaxFileSize() {
+        return maxFileSize;
+    }
+
+    @Metadata(description = "The maximum size allowed for uploaded files. -1 
means no limit",
+              defaultValue = "-1", label = "consumer")
+    public void setMaxFileSize(long maxFileSize) {
+        this.maxFileSize = maxFileSize;
+    }
+
+    public long getMaxRequestSize() {
+        return maxRequestSize;
+    }
+
+    @Metadata(description = "The maximum size allowed for multipart/form-data 
requests. -1 means no limit",
+              defaultValue = "-1", label = "consumer")

Review Comment:
   Maybe these should also be advanced label like in the endpoint



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to