LiveConnectClient uploadToPath:fileName:data:overwrite:delegate:userState method

Performs an asynchronous upload of a resource to a user's Microsoft OneDrive account.

This method uses a given path, file name, file data, and optionally, a LiveUploadOperationDelegate, user state, and an option to overwrite an existing file.

Signature

- (LiveOperation *) uploadToPath:(NSString *)path
                        fileName:(NSString *)fileName
                            data:(NSData *)data
                       overwrite:(LiveUploadOverwriteOption)overwrite
                        delegate:(id <LiveUploadOperationDelegate>)delegate
                       userState:(id)userState;

Parameters

Name

Datatype

Description

path

NSString

Required. The path or object ID of the folder to upload the file to.

fileName

NSString

Required. The file name to use for the file being uploaded on OneDrive.

data

NSData

Required. The NSData instance that contains the data to upload.

overwrite

LiveUploadOverwriteOption

Optional. A value that indicates what should happen if a file that's being uploaded tries to overwrite a file with the same name in the upload location.

delegate

id <LiveUploadOperationDelegate>

Optional. An instance of a class that implements the LiveUploadOperationDelegate protocol.

userState

id

Optional. An object that is used to track the asynchronous state. The userState object is found in the userState property of the LiveOperation instance that is passed as a parameter when a LiveUploadOperationDelegate protocol method is invoked.

Returns

Type: LiveOperation

The asynchronous operation that is used to track the asynchronous REST reference request and get response data once the operation completes.

Defined in

LiveConnectClient.h

See also

LiveConnectClient class