Fix bug with POST uploads returning 400 client error