private function getErrMsg($errno) {
        if($errno == UPLOAD_ERR_INI_SIZE) {
            return 'uploaded file larger than max size specified in php.ini';
        } else if($errno == UPLOAD_ERR_FORM_SIZE) {
            return 'uploaded file larger than max size specified in form field'; 
        } else if($errno == UPLOAD_ERR_PARTIAL) {
            return 'server only received part of the uploaded file';
        } else if($errno == UPLOAD_ERR_NO_FILE) {
            return 'the http request did not contain the uploaded file';
        } else if($errno == UPLOAD_ERR_NO_TMP_DIR) {
            return 'the server does not have a temp upload directory';
        } else if($errno == UPLOAD_ERR_CANT_WRITE) {
            return 'the uploaded file could not be written to disk';
        } else {
            return 'an error occured during file upload. errno: ' . $errno;
        }
    }