- Home /
WWW file download size
As we can see in the WWW API, we can see the bytesDownloaded
and progress
while downloading a file. Considering we have this data, how come there isn't a file size parameter or is there something I am missing?
Is there a way I can know how much the file size of my file is before downloading?
Thanks in advance
Comment
Could be wrong but I don't think there is.
Quite often with http, the server doesn't know how big a thing it's sending until it's sent it. So if there were a way, it'd have to be something you put in the request headers (second arg to the WWW ctor), asking the server to go through the process of constructing the response, but then not actually send it (just send you the size).