Make fixes to server so that it works with the new uploadfiles (WIP)