Update upload.php

There was a bug in multiple file uploads, now I've fixed.
Merge pull request #1286 from dmahesh22/master

Update upload.php