I have a question about multiple file uploads using arrays[1]. Say I have 4 text fields with a file input field "related" to each one on a JSP like this:
<input type="text" name="attrVal"/> <s:file label="File (1)" name="attrImg" /> <input type="text" name="attrVal"/> <s:file label="File (2)" name="attrImg" /> <input type="text" name="attrVal"/> <s:file label="FIle (3)" name="attrImg" /> <input type="text" name="attrVal"/> <s:file label="FIle (4)" name="attrImg" /> The user must enter a value in the text field, but uploading a file isn't required. If the user picks a file for "File(1)" and "File(4)", in my Action class the attrImg File[] only has two values in it. This makes sense, but I'm wondering, is there a way I can get Struts to include null values in the File[] for the file upload fields (in this case 2 and 3) the user didn't choose a file for? I need to keep the files associated with the textfield data in my action, as it works now, I can't do that, because I won't know which textfield the files are "related" to. I can't give each upload field a unique name, as the user is able to add a new textfield/file input pair dynamically. Any ideas would be greatly appreciated. Thanks! Nate [1] http://struts.apache.org/2.1.6/docs/file-upload.html#FileUpload-UploadingMultipleFilesusingArrays -- View this message in context: http://www.nabble.com/-s2--Multiple-file-upload-using-arrays-tp24750296p24750296.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org