Changed outputstream to UploadOutputStream.