Solved

ASP.NET: How can I group or link files uploaded together

Posted on 2014-10-05
5
411 Views
Last Modified: 2014-10-07
I have been able to set up a web page that allows uploading of multiple files.  Users can also download any of the files that have been uploaded. I'm storing the uploaded files in the database (SQL Server) as they are not too large.

I have been asked to enhance this functionality as follows:

If person A uploads a batch of files via this webpage, other users of the site should be able to see the files in a batch displayed together.  If a second batch of files is uploaded by person A at a later date, the users should see that batch together.  Here's an example of what the file listing for download should look like (roughly - it just needs to show a way to differentiate related files):

Report 1 (a report file)
supporting document1 (documentation for report 1)
supp. doc 2 (more documentation for report 1)
....
supp doc n

Report 2 (another report file uploaded at a different time)
supp doc 1
supp doc 2
...
support doc n

In other words, the report file and its related files should be grouped together in some way that would allow the end users to know which supporting files belong to any given report.  My management does not want the end users to have to read a guide that tells them which files go with the report file.  They also don't want the report developers to have to modify the file names to assist with programmatically grouping the files.

All I've been able to think of, (and this is a kludge and hardly a robust solution), is to instruct person A to always upload all related file together at one time, I would add a dropdown that person A would use to select an item to help me "glue" the files together.   I mean that they could select a word that I would use to select files that belong together.  I think I'd also have to use a datetime stamp that just looked at the date and hour (not minutes or seconds) so that I could hook files uploaded together using these two hidden fields.

Please let me know if there's better way.  I sure hope there is because my solution doesn't sound too solid.
Also please let me know if I should clarify anything.  I haven't started coding this yet because I want to think about whether I could come up with something better.  I've done quite a bit of searching but I haven't found anything remotely like this.  possibly I'm using the wrong keywords.

Thanks!
0
Comment
Question by:Brad Aberg
  • 3
  • 2
5 Comments
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
Comment Utility
Back in the day we used to use winzip or winrar to aggregate the files before uploading this way the user would get the complete set.  another way is to add a category or tag for the files and then group by tag/category
0
 

Author Comment

by:Brad Aberg
Comment Utility
Thank you David,
What kind of tag/category did you add?  Was it a separate field? how did you use it?

I like the zip idea. I'm not sure management will go for it because I think they want the users to be able to just grab a file a a time for preview before downloading all in the batch.
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
It will be a separate item in the database table. you will have to code the insertion and retrieval methods
0
 

Author Comment

by:Brad Aberg
Comment Utility
Thanks David, that's what I was describing in my initial post.  That I would use part of the timestamp and/or a word added to the filename so that I could distinguish them and group them together.  

Do you think that's the best way?  I liked the zip method but unfortunately in this case it might not meet requirements because they want the users to be able to click on the report and supporting documents individually from the web page.

Thanks.
0
 

Author Closing Comment

by:Brad Aberg
Comment Utility
adding the column to the database is the method I thought of, and when you mentioned it too, I decided to pursue this.  Unfortunately I have an error when trying to update the database table row with the selected index of the drop down.  I have another thread open about that but I'm not sure if experts come back and reply again after I reply to their reply so OI'll see what happens.

At this point I need some help with syntax.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now