Skip to content

Wait For Upload

//trimblecloud-fileservice/trimblecloud.fileservice/FilesAPI/waitForUpload

waitForUpload

[JVM]
abstract fun waitForUpload(@NonNullspaceId: @NonNullUUID, @NonNulluploadId: @NonNullUUID, interval: Duration, timeout: Duration, callback: UploadStatusCallBack): CompletableFuture<Response<UploadDetails>>

Poll the upload status by Id. If the status is COMPLETED or FAILED, it returns the uploadResponse. Otherwise, it waits for delay second and recursively calls itself to poll again.

Return

  • A future that resolves to the upload response.

Parameters

JVM

spaceId- The space id.
uploadId- The upload id.
interval- Time interval between each poll.
timeout- Duration to wait before timing out.
callback- A callback to be know the status of operation.

Throws

TCPServiceException- If an error occurs due to API or network-related issues.
SDKClientException- If a client-side error occurs within the SDK.