Welcome to SOes: D your question has 2 parts:
- The use of
ASP.net
and jQuery File Uploader
for uploading files.
- The architecture at the database level for managing files.
I help you with the database: D I recommend you do the following:
Add a pair of tables called: Archivos
and EnlaceArchivosRegistros
(* consider that the word Registros
refers to the other table you have storing the data)
The relationship of these tables is:
- A
Archivo
has one or many EnlaceArchivosRegistros
- A
Registro
has one or many EnlaceArchivosRegistros
The EnlaceArchivosRegistros
table contains basically (as a recommendation):
- Unique ID.
- File ID.
- Registry ID.
- Creation date.
- Data of the user who created it.
The Archivos
table will have:
- ID
- File name
- Extension
- Physical path where it is
- Date and time of creation
- User who created it
With this, your business logic remains almost intact:
the difference lies in instead of passing the file directly, now save it in another table and if you have many more files to upload, you add them to Archivos
and create a new record in the table EnlaceArchivosRegistros
.
Please note that to complete this suggestion, you must migrate the document routes of the table you have running and create the relationships with the EnlaceArchivosRegistros
table.
The query will change when you want to show the information, since you will need to include 2 more tables, also in the view you will have to do for
or% foreach
to visualize all the data obtained from the list of linked files.
I hope you have let me understand, any questions / questions you have, add a comment that we all learn: D