Fixed server upload code.