Basic upload support

Implements very crude upload support. Much more needs to be done from here.