struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlay...@christian.net
Subject Problem on upload multiple files with Struts
Date Wed, 12 May 2004 15:00:15 GMT
Hi all,
  I am currently working on a file upload function with struts.
        The original upload function allows multiple file uploads, with JSP's html form submitted
to the action. the
+uploadform uses dynamic properties, and the jsp file refers to them with formFile[0], formFile[1]
...
    Now I wanna it be able to upload unlimited amount of files, with a selection box listing
current "uploaded" file list
+and a file selection box to the let user choose new files. And the user is free to remove
any prevoiusly "uploaded"
+file. All the files are not write  to the database until user presses submit button.
  In this way, we gotta three different "modes" for the Action:
 add -   add the file to the list
 remove - remove it from the list
 submit - submit all files in the list


  My questions:
1) Shall I implement the add/remove function with Javascript, which only operates on the select
box(filenames), or
+implement different operations in the UploadAction.

2) For the latter case, the sequence is: the user chooses a file -> click the add button(which
submits the form and set
+parameter action to "add") -> The Action's , and lateron return an ActionForward back
to the upload page.

3. If we only needs javascript, how do we retrieve all the datafiles based on their filenames
in the action.


Thank you!


---
Regards,
Ding Lei



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message