code: public <E extends Throwable> String chunkedUploadFirst(int chunkSize, DbxStreamWriter<E> writer)
          throws DbxException, E
      {
          HttpRequestor.Response response = chunkedUploadCommon(new String[0], chunkSize, writer);
          try {
              ChunkedUploadState correctedState = chunkedUploadCheckForOffsetCorrection(response);
              if (correctedState != null) {
                  String requestId = DbxRequestUtil.getRequestId(response);
                  throw new BadResponseException(requestId, "Got offset correction response on first chunk.");
              }
  
              if (response.getStatusCode() == 404) {
                  String requestId = DbxRequestUtil.getRequestId(response);
                  throw new BadResponseException(requestId, "Got a 404, but we didn't send an upload_id");
              }
  
              if (response.getStatusCode() != 200) throw DbxRequestUtil.unexpectedStatus(response);
              ChunkedUploadState returnedState = chunkedUploadParse200(response);
  
              if (returnedState.offset != chunkSize) {
                  String requestId = DbxRequestUtil.getRequestId(response);
                  throw new BadResponseException(requestId, "Sent " + chunkSize + " bytes, but returned offset is " + returnedState.offset);
              }
  
              return returnedState.uploadId;
          }
          finally {
              IOUtil.closeInput(response.getBody());
          }
      }
docs: Upload the first chunk of a multi-chunk upload.
  
  @param chunkSize
  The number of bytes you're going to upload in this chunk.
  
  @param writer
  A callback that will be called when it's time to actually write out the
  body of the chunk.
  
  @return
  The ID designated by the Dropbox server to identify the chunked upload.