upload

public abstract CancellationToken upload(@NonNull() Document document, @NonNull() GiniCaptureNetworkCallback<Result, Error> callback)

Called when a document needs to be uploaded to the Gini API.

You should only upload the document. Polling or retrieving extractions is not needed at this point.

Return

a CancellationToken to be used for requesting upload cancellation

Parameters

document

a Document containing an image, pdf or other supported formats

callback

a callback implementation to return the outcome of the upload