On 13/07/2020 18:33, Builder Lynx Demo wrote:

<snip/>

> My tomcat is configured to accept multipart/form-data posts.  Here is
> the relevant portion in the WEB-INF/web.xml:
>     <multipart-config>
>       <max-file-size>505242880</max-file-size>
>       <max-request-size>505242880</max-request-size>
>       <file-size-threshold>5000</file-size-threshold>
>       <location>/home/pics</location>
>     </multipart-config>
> 
> Assuming both the files are larger than 5000 bytes, then both should be
> saved in the /home/pics directory.

This doesn't look right. The location is the *temporary* upload
location. Files are uploaded there but only kept until the request has
completed processing.

It is up to the application to copy the temporary files somewhere else.

Note also that the temporary files should have (form looking at the
upload code) unique names.

> However (and this is the issue) given that they have the same name, then
> one file over-writes the second file.

That looks like an application issue at this point. The application is
in control of whether the temporary files get copied anywhere else and
the names used for them if they are.

See this example from the Tomcat Manager application:
https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/manager/HTMLManagerServlet.java#L292

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to