samedi 28 septembre 2019

Upload multiple files using different forms

I am building a web application where the end user would upload multiple files. Now the simplest way is to ask the user to upload multiple files using the same form and then just iterate over the files in the app logic but there are two important concerns:

  1. I want to keep track of the file not using it's name but using the form. For example, if the form says Upload report csv. The advantage of this approach is that I know that no matter what the filename is, it always belongs to the report category.
  2. The user can make a mistake and instead of multiple files, he/she can upload only one. So for each category like reports and data, I want that there are two forms and once the first file is uploaded successfully, the page should refresh and should ask for the other file belonging to different category.

In short, I want to do this: Form1-> upload reports -> Uploaded -> Refresh/Redirect -> Form2 ->upload data file




Aucun commentaire:

Enregistrer un commentaire