server upload functionality