Define upload utility function.