Refactor upload.php.
Merge pull request #2 from caseyscarborough/master

Refactor upload.php.