Validation added to upload form

Take a look at the validation logic.  I mainly tried to get server-side validation to ensure we don't get malicious users killing us.  We could still probably do more....