PDA

View Full Version : Check if a download has complete?


DustyPorViva
08-06-2007, 10:40 PM
Is there any function that checks when a download has finished? I know there's downloadpos and such, but it's hard to use stuff like getimgwidth/height when images haven't been downloaded yet.
So ya, any way to check when an image is downloaded? And no, I can't use any combination of downloadpos and such, as the image is too small.

Crow
08-06-2007, 10:43 PM
Maybe try fileexists() clientside? I'm not sure if it works, but it might.

JkWhoSaysNi
08-07-2007, 10:07 PM
You could put the images in a package so they have to be downloaded when someone logs on.

DustyPorViva
08-07-2007, 10:52 PM
Ya, I was thinking of doing that.

Admins
08-09-2007, 08:55 PM
I think getimgwidth() is forcing the download of the image, so once it is not zero anymore then it finished downloading.

There are various functions for checking the download of files:
isdownloading(filename) - boolean, checks if a file is currently downloading
isdownloadingfiles() - bool
downloadfile - string
lastdownloadfile - string
downloadpos - integer
downloadsize - integer
fileexists(filename) - bool
filesize(filename) - integer
fileupdate(string) - bool