MBXUploadServiceInterface
@protocol MBXUploadServiceInterface
Interface to the Upload service. This interface provides basic functionality that allows uploading to the Mapbox backend.
-
Sends an upload request to the native or custom Upload Service.
Declaration
Objective-C
- (uint64_t)uploadForOptions:(nonnull MBXUploadOptions *)options callback:(nonnull MBXUploadStatusCallback)callback;Parameters
optionsThe configuration of the request, including URL and file path.
callbackCallback to be called in response to the request for updates.
Return Value
ID handle to cancel the upload.
-
Cancels a pending or running upload. In case of success, the result of the HttpResponse in the request’s callback will hold the error RequestCancelled
Declaration
Objective-C
- (void)cancelUploadForId:(uint64_t)id callback:(nonnull MBXResultCallback)callback;Parameters
idHandle given by upload() method.
callbackCallback to be called after attempt to cancel requests. Use this for error handling related to the id. It does not report if the request gets actually cancelled.
MBXUploadServiceInterface Protocol Reference