Can I compress/zip the files collected by MultiFile before they are deleted from NeatUpload_Temp?
I am using your MultiFile class to upload multiple files and the code on the .aspx file is this: <Upload:MultiFile ID="UploadMultiFiles1" runat=server UseFlashIfAvailable=true FlashFilterExtensions="*"></Upload:MultiFile>
As soon as you call the method MoveTo() to move every file, all files temporarily go to the storage fold NeatUpload_Temp (locating at ~/app_data/NeatUpload_Temp) and then go to the destination folder that you define. And finally, all temporary files in NeatUpload_Temp are deleted. Now, I want to use the DotNetZip component (http://dotnetzip.codeplex.com/) to compress all the temporary files before they are gone. Is it possible to do that? If it is yes, how can I do that? I have to zip the files before you run the code to delete them fromm the NeatUpload_Temp folder.
By the way, where is the event handler source code to handle the event when you click the “Submit” button to upload collected files? Thanks.
Re: Can I compress/zip the files collected by MultiFile before they are deleted from NeatUpload_Temp?
The DotNetZip component runs like this: example,
//ZipFile is from the DotNetZip namespace ZipFile zip = new ZipFile("MyNewZip.zip"); zip.AddFile("YourFileName, "YourDirectoryPathInAchive");
Now, from the MultiFile object, I can get file's name. So, the 1st parameter for AddFile has no problem. However, for the 2nd parameter, problem happens. From where I can get the directory path for the files collected by MultiFile? Before calling MultiFile's MoveTo(), I cannot see any temporary files in the NeatUpload_Temp folder. Where are the collected files?
Furthermore, supposely you successfully compress all collected files to MyNewZip.zip. You'v got to clean up all the temporary files in NeatUpload_Temp folder. Where is the code for cleaning up?
Re: Can I compress/zip the files collected by MultiFile before they are deleted from NeatUpload_Temp
It looks like you are misunderstanding the meaning of the args to AddFile(). This isn't really a NeatUpload-specific question. Try getting your code to work with a standard asp.net FileUpload control. If you get that working and can't figure out how to make it work with NeatUpload, please post again.