Seems there is more going on, as without it there are two extra parts
with no StoreLocation.
name=, StoreLocation=null, size=0 bytes, isFormField=false,
FieldName=uploadedFiles
name=myimage.jpg,
StoreLocation=/home/dev/git/myapp/myapp/work/upload_0f8323e4_9dd9_4972_8305_6b7c31911f47_00000033.tmp,
size=1050531 bytes, isFormField=false, FieldName=uploadedFiles
name=, StoreLocation=null, size=0 bytes, isFormField=false,
FieldName=uploadedFiles
On 30/12/2022 09:18, Lukasz Lenart wrote:
pt., 30 gru 2022 o 10:06 Greg Huber <gregh3...@gmail.com> napisaĆ(a):
Also need an extra check || "".equals(part.getSubmittedFileName()
for (Part part : parts) {
if (part.getSubmittedFileName() == null ||
"".equals(part.getSubmittedFileName()) ) { // normal field
Empty getSubmittedFileName() means the file was uploaded but with
empty "filename" attribue in the Content-Disposition header
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#as_a_header_for_a_multipart_body
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org