Forum Discussion

lindee's avatar
lindee
Visitor
16 years ago

roUrlTransfer download progress

is there any way to extract how many bytes have been downloaded by the roUrlTransfer.AsyncGetToFile method?

1 Reply

  • To know the expected size, when you get the roUrlEvent, you can call GetResponseHeaders() and get the value for the content-length header.

    Unfortunately, we don't currently expose a call to get the file stat info... You will need to read the file into an array to find the actual size.

    ba=CreateObject("roByteArray")
    ba.ReadFile("tmp:/ByteArrayTestFile")

    numBytes = ba.Count()

    --Kevin