working basic upload functionality