How do I upload multiple files in Struts 1's ActionForm
?
I have to show multiple options of file uploading and save them at time.
I don't want to show input box for file in Struts 1?
Windows – in Files Explorer, select multiple files > right-click > Send to > Compressed (ZIP) folder. macOS – in Finder, select multiple files > Ctrl +select or right-click > Compress n items.
In Lightning, you can upload multiple files to a Content Library by going to the Files Tab > Selecting the LIbraries filter > Select the Library you'd like to upload to. The Add Files actions will allow multi-file upload to the Library or folder within the Library which you select.
In Struts if you want multiple of anything, you need to create an array of the type you want.
In file upload, you need to have an array of FormFile
and multiple input text boxes with the name to the same Struts ActionForm FormFile attribute.
You can either use JQuery File Upload which can be easily embed with JSP and can be used with FormFile object of struts.
Or You can define an array of FormFile objects in the ActionForm class.
But for that you have to show multiple input boxes for files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With