First part of upload code. Define some interfaces to use for model
and for requests.