Licensee was looking for a way to get total file size to display download progress. On Windows (which uses the curl library for Http request/response), binding a function to the OnRequestProgress delegate and getting the FHttpResponsePtr from the FHttpRequestPtr and calling FHttpResponsePtr::GetContentLength() correctly returns the total file size.
Output from sample project
LogHttpTest:Warning: Received Size = 16384, TotalSize = 1291706, PercentDone = 1.27 LogHttpTest:Warning: Received Size = 32768, TotalSize = 1291706, PercentDone = 2.54 LogHttpTest:Warning: Received Size = 49152, TotalSize = 1291706, PercentDone = 3.81
On Mac total size returns the same value as received size, so it's not possible to calculate a percent done. (I only tested Mac, but if memory serves, the implementation is the same for Mac and iOS):
LogHttpTest:warning: Received Size = 81301, TotalSize = 81301, PercentDone = 100.00100.00 LogHttpTest:warning: Received Size = 325157, TotalSize = 325157, PercentDone = 100.00100.00 LogHttpTest:warning: Received Size = 589205, TotalSize = 589205, PercentDone = 100.00100.00 LogHttpTest:warning: Received Size = 801741, TotalSize = 801741, PercentDone = 100.00100.00 LogHttpTest:warning: Received Size = 1278325, TotalSize = 1278325, PercentDone = 100.00100.00
Originally reported here:
FHttpRequestPtrで、ダウンロードしているファイルのTotalSizeが知りたいです。
I am not able to find world outliner how to enable it?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How can i modify the param name in EQS node
How does UMG set overlapping layouts?
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
I can't open my map from the editor.
Why does the REMOVE method of map container remove elements have memory leaks?
Head over to the existing Questions & Answers thread and let us know what's up.