Merge pull request #2371 from thefuzzy0ne/fix/upload_err_constants

Modified do_upload() to use UPLOAD_ERR constants.