Also need an extra check || "".equals(part.getSubmittedFileName()

for (Part part : parts) {
            if (part.getSubmittedFileName() == null || "".equals(part.getSubmittedFileName()) ) { // normal field                 LOG.error("Ignoring a normal form field: {}", part.getName());
            } else { // file upload
                LOG.error("Storing file: {} in save dir: {}", part.getSubmittedFileName(), saveDir);
                parseFile(part, saveDir);
            }
        }

On 30/12/2022 09:01, Lukasz Lenart wrote:
pt., 30 gru 2022 o 09:39 Greg Huber <gregh3...@gmail.com> napisał(a):
Is it possible to use the original temp file that tomcat creates rather
than creating another one?
If "struts.multipart.saveDir" is not provided (or empty), Struts will
use "javax.servlet.context.tempdir" which should be defined in servlet
context. Yet I notice some inconsistency and I'm working on that.


Regards

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

Reply via email to