jadacyrus at gmail.com
Tue Aug 1 19:14:06 EDT 2006
Essentially this is what I have setup for my upload script: [code] #HTML Stuff here #Declare variables etc... while bytes_left >= 0: fileData = req.form['filename'].file.read(1024) filebuffer = filebuffer + fileData bytes_left = bytes_left - 1024 bytes_read = bytes_read + 1024 percent = bytes_read/int(length) * 100 #Some nested IF statements to display a progress indicator using images based on the percent variable. [/code] This is contained in my upload.py in the function upFile which is called from the POST method. However, It seems that the file uploads completely first and then it will show the progress indications afterwards. However this doesn't seem to be logically what my code should be doing. I'm somewhat new to mod_python but not python in general, any suggestions?