Re: How do I can upload serveral files at same tim - WeOnlyDo Discussion board

Re: How do I can upload serveral files at same tim (General questions)

by yinpengxiang, Tuesday, August 25, 2009, 12:13 (5568 days ago) @ wodDamir

I used the block model the progress event is not work before the progress is 100 .
the code you offered for uploading is the one by one way, I want to upload files at same time, as the following code, but the result is not my expect result:
void DownloadFiles(string[] files)
{
while(localFiles.Count>0)
{
System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(Dowork));
t.Start();
}
}
void Dowork()
{
if (localFiles.Count == 0) return;
string file = localFiles[0];
localFiles.Remove(file);

wodFtpDLXComClass ftp = new wodFtpDLXComClass();
ftp.Blocking = true;
ftp.Connect(hostName, port, protocol);
ftp.PutFile(file, remoteFilePath);
}


Complete thread: