Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lindee
Visitor

roUrlTransfer download progress

is there any way to extract how many bytes have been downloaded by the roUrlTransfer.AsyncGetToFile method?
0 Kudos
1 REPLY 1
RokuKevin
Visitor

Re: roUrlTransfer download progress

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
0 Kudos