Ken said:
I just want to use the file size to make sure it is smaller than a set
maximum. The image file size will only be use on the viewers browser.
Is it still considered a different domain? different protocol? if it is used
on the viewers domain. I do not want to use the size for upload.
Can you suggest which browsers do make the file size available?
My problem is:
If the viewer uploads a file greater the MAX_FILE_Size in PHP, he may have
to wait for several minutes if the file is size is 3000000. After which,
PHP set the file size to 0. The viewers then has to start the process over.
I am looking for a way to make sure the files sizes are under the max file
size without uploading, i.e. save time and eliminate an annoyance.
Ken
Why does filesize = -1 on the first pass and after it runs through a second
time, the filesize is correct.
What does -1 mean?
document.getElementById('preview').appendChild(x);
wid = document.images[0].width;
height = document.images[0].height;
status=(document.images[0].fileSize)*1;
alert(wid + " " + height + " " + wid*height + " " + status); //
status = -1
wid = document.images[0].width;
height = document.images[0].height;
status=(document.images[0].fileSize)*1;
alert(wid + " " + height + " " + wid*height + " " + status); //
status = 4.8 mb
document.getElementById('preview').removeChild(x);
Ken