fix uploading bug

a corresponding server side in Java will be uploaded in next commit