Well connect inside the loop... not really good thing. You should keep connection opened. You can call connect every time, because it will do nothing if connection is opened.
for the file size. You should check the real file size and not the file size on the HDD. Depend on the Sector size... each file will be bigger or smaller. So what is the difference between local and uploaded file?
for the file size. You should check the real file size and not the file size on the HDD. Depend on the Sector size... each file will be bigger or smaller. So what is the difference between local and uploaded file?