Ok, here is the scenario, my requirements force me to allow users to be able browse to a zip/ rar files and have it automatically decompress the files for upload to our database server. This same control must also allow single file upload to the same database table. For the purposes of this post think about images and zip/ rar files containing images…
My current functionality follows this use case:
1. User selects a file to be uploaded and hits the add file button.
2. The file is stored in the session as an HtmlInputFile and the filename is displayed in the listbox.
3. The user hits the update button and the files are uploaded to the database (not the file system).
The new requirement must also follow the following as well as the previous:
1. User selects a zip or rar file and hits the add file button.
2. The zip/ rar file is decompressed and each approved content type is added to session as an HtmlInputFile and the filename of the decompressed file is displayed in the listbox.
3. The user hits the update button and the files are uploaded to the database (not the file system).
How might I accomplish this when the HtmlInputFile.PostedFile members (FileName, ContentType, and InputStream) are all read-only?
Thanks!