Well since it's a custom web part it depends on your custom logic.
Have a look at the Event Handler for your Upload/submit button.
Depending if you have any validations or errors you could use something like:
Page.Validate();
if (Page.IsValid)
{
// Take some action based upon all data being valid.
}
else
{
// Take some other action based upon some some data being invalid.
}