[
https://issues.apache.org/jira/browse/WW-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukasz Lenart closed WW-5225.
-----------------------------
Resolution: Fixed
This is addressed by using {{ActionFileUploadInterceptor}} which is available
since Struts 6.4.0. More details in the
[docs|https://struts.apache.org/core-developers/file-upload.html#basic-usage].
> add accessor to the original filename into JakartaMultiPartRequest &
> MultiPartRequestWrapper
> --------------------------------------------------------------------------------------------
>
> Key: WW-5225
> URL: https://issues.apache.org/jira/browse/WW-5225
> Project: Struts 2
> Issue Type: Improvement
> Reporter: Eric Blanquer
> Priority: Trivial
> Fix For: 6.4.0
>
>
> HTML input file with *webkitdirectory* *mozdirectory* allow to upload a folder
> {code}<input type="file" name="folder" webkitdirectory mozdirectory />{code}
> but MultiPartRequestWrapper.getFileNames("folder") returns only the
> canonicalName of files
> https://github.com/apache/struts/blob/12beb20949a14e8bcdff2e8ca1749ea29d880a77/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java#L233
> it will be very useful to be able to get the original *filename* of the
> multipart request to be able to create the folder arborescence
> multipart POST eg:
> {code}-----------------------------19664509768416840202761310294
> Content-Disposition: form-data; name="folder";
> filename="folder0/folder1/file1.txt"
> Content-Type: text/plain
> -----------------------------19664509768416840202761310294
> Content-Disposition: form-data; name="folder";
> filename="folder0/folder2/file2.txt"
> Content-Type: text/plain
> -----------------------------19664509768416840202761310294
> Content-Disposition: form-data; name="folder";
> filename="folder0/folder3/file3.txt"
> Content-Type: text/plain
> -----------------------------19664509768416840202761310294--
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)