This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch fix/after-rebase
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 94a4f559e9f7c386570dbcab2180d515ab2ccb59
Author: Lukasz Lenart <[email protected]>
AuthorDate: Mon Dec 11 07:37:38 2023 +0100

    WW-5371 Implements action based file upload
---
 .../apache/struts2/action/UploadedFilesAware.java  | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git 
a/core/src/main/java/org/apache/struts2/action/UploadedFilesAware.java 
b/core/src/main/java/org/apache/struts2/action/UploadedFilesAware.java
new file mode 100644
index 000000000..635e0b2d4
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/action/UploadedFilesAware.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.action;
+
+import org.apache.struts2.dispatcher.multipart.UploadedFile;
+
+import java.util.List;
+
+/**
+ * Actions that want to be aware of all the uploaded file should implement 
this interface.
+ * The {@link org.apache.struts2.interceptor.ActionFileUploadInterceptor} will 
use the interface
+ * to notify action about the multiple uploaded files.
+ */
+public interface UploadedFilesAware {
+
+    /**
+     * Notifies action about the multiple uploaded files, when a single file 
is uploaded
+     * the list will have just one element
+     *
+     * @param uploadedFiles a list of {@link UploadedFile}.
+     */
+    void withUploadedFiles(List<UploadedFile> uploadedFiles);
+
+}

Reply via email to