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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.