Hi.
Using the CURLMultiMBS with lots of files to upload seems like it would use
a lot of memory as you need to load all the file data into each
curlSMBS.InputData property.
I was thinking of just keeping a reference to the file in the CURLSMBS
class and reading the file in only when it is ready to be uploaded from the
CURLMulti.Perform method.
There isn't a way to know when the file transfer is about to start so my
strategy was;
1. Load in the first 20 files or so
2. Keep a reference to each file in CURLSMBS
3. In CURLMulti.TransferFinished I could loop through the CURLSMBS classes
in CURLMulti.CURLs() and load in the next file to the CURLSMBS.InputData
I found this was not possible because this does not compile;
Dim u As UploadCURL = UploadCURL(me.CURLs(i))
I am wondering if;
1. We can get an event that a file is about to start uploading so I can
read it in on demand
2. I can access the individual CURLSMBS in the CURLMulti.CURLs() array
3. Or maybe I am dong something wrong and what I want to do is already
possible?
Here is the code I am using to load in the files in the
CURLMulti.TransferFinished
method
Dim itemMax As Integer = Me.CURLs.Ubound
For i As Integer = 0 To itemMax
Dim u As UploadCURL = UploadCURL(me.CURLs(i))
If FileIsOK(u.myFile) And u.InputData.LenB = 0 Then
Dim bItem As BinaryStream = BinaryStream.Open(u.myFile, False)
If bitem = Nil Then
Break
Exit
End If
u.InputData = bitem.read(bitem.Length)
bitem.Close
bitem = Nil
Exit
End If
Next
Thanks in advance for any help,
Paul
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info