I've created an upload-status bar with AJAX and setInterval. Everything is OK, but I have 1 problem. In the AJAX function I divide the current size of filesize("new_path") by $_FILES["video"]["size"] - which is it's real size. My aim is to print 100 times of it as the percentage. But sadly, PHP calculates the new path's size as the all size of the file. So it prints 100% from the begining to end. I guess the reason is: When it starts uploading, it books that amount of memory from the begining, so PHP calculates as if it's already uploaded. Do you know any solution? I want to put an upload status bar.
Are you sure? Try to upload the file and check the size while it is uploading using CP or SSH. Also insure that you are reading the file from the tmp_name. Peace,