Hi, seems like when I use the following code below, the log tells me that the size of "legohead.png" is 0 bytes. I can assure, that this file is around 2,5kb.
Dim size As Long
size = File.Size(File.DirAssets, "legohead.png")
You could also just get the file size in Windows and hardcode it in your function call. Once in Assets/APK it is read only and isn't going to change.
(Select file and press Alt+Enter or Right Click and Select Properties, and use the bytes in parentheses not the rounded kilobytes or size on disk values)
You can also use HttpJob.PostFile. PostFile sends files smaller than 1mb as a bytes array. There is an advantage for sending files this way as HttpClient will automatically retry to send the file for up to 3 times if there was any error during upload. Since File.Size returns 0, the file will be treated as a small file (which I assume is correct).