Multiple calls to PutFile - WeOnlyDo Discussion board

Multiple calls to PutFile (General questions)

by Chris S, Thursday, September 06, 2007, 16:25 (6288 days ago)

What is the expected behavior if PutFile is called multiple times in NON-blocking mode.

Here's some pseudo code...

SetModeNonblocking();
PutFile(src1, dest1);
PutFile(src2, dest2);
PutFile(src3, dest3);
PutFile(src4, dest4);

I'm mainly interested in knowing how the Progress and Done events will be fired for each operation. How will i know what file the new progress event is for? How will i know what file the Done event is for?

Thanks in advance,
Chris

Re: Multiple calls to PutFile

by woddrazen, Thursday, September 06, 2007, 16:44 (6288 days ago) @ Chris S

Hi Chris,


When file is uploaded to server Done Event is fired and you can procedure with next file for upload.

Before each PutFile line in your code you can put some variable with different value. For example for first file you can put value first file . When Progress Event or Done Event is raised you can check what is value of that variable and that will show you which file is uploading in Progress Event and in Done Event will show when file is uploaded. For first file in my example value will be first file .

In our Knowledge base you can find example how to upload multiple files in non blocking mode:
http://www.weonlydo.com/index.asp?kb=1&View=entry&CategoryID=5&EntryID=46

It is for wodSFT but same is for wodFtpDLX.

Hope this helps.


Regards,
Drazen

Re: Multiple calls to PutFile

by Chris S, Thursday, September 06, 2007, 16:55 (6288 days ago) @ woddrazen

Drazen,

Thank you for your reply. I may not have explained my question clearly. What i'm trying to do i get multiple files to upload to the server at once.

Using the techniques described in your knowledge-base, multiple files would be uploaded however the 2nd file would not begin until the 1st file was finished etc. What i'm trying to do is get all files to upload at once in parallel.

Thanks,
Chris

Hi Chris,


When file is uploaded to server Done Event is fired and you can procedure with next file for upload.

Before each PutFile line in your code you can put some variable with different value. For example for first file you can put value first file . When Progress Event or Done Event is raised you can check what is value of that variable and that will show you which file is uploading in Progress Event and in Done Event will show when file is uploaded. For first file in my example value will be first file .

In our Knowledge base you can find example how to upload multiple files in non blocking mode:
http://www.weonlydo.com/index.asp?kb=1&View=entry&CategoryID=5&EntryID=46

It is for wodSFT but same is for wodFtpDLX.

Hope this helps.


Regards,
Drazen

Re: Multiple calls to PutFile

by woddrazen, Thursday, September 06, 2007, 17:07 (6288 days ago) @ Chris S

Chris,


You can done that with multiple instance of wodFtpDLX.

You should than for each file create own instance of wodFtpDLX and connect with each instance to server and upload file.

Hope this helps.


Drazen