functioning upload via json