Added beginnings of upload function