OneDrive/ODConnection.public.cs
/// <summary>
/// Uploads a file using the resumable fragment upload API, splitting the file into smaller pieces to upload.
/// </summary>
/// <param name="parentItemReference"></param>
/// <param name="filename"></param>
/// <param name="sourceFileStream"></param>
/// <param name="options"></param>
/// <returns></returns>
Uploads a file using the resumable fragment upload API, splitting the file into smaller pieces to upload.
Uploads a file using the resumable fragment upload API splitting the file into smaller pieces to upload .
public async Task<ODItem> UploadLargeFileAsync(ODItemReference parentItemReference, string filename, Stream sourceFileStream, ItemUploadOptions options)
        {
            if (!parentItemReference.IsValid())
                throw new ArgumentException("parentItemReference isn't valid");
            if (string.IsNullOrEmpty(filename))
                throw new ArgumentNullException("filename");
            if (!filename.ValidFilename())
                throw new ArgumentException("filename contains invalid characters");
            if (null == sourceFileStream)
                throw new ArgumentNullException("sourceFileStream");
            if (null == options)
                throw new ArgumentNullException("options");
            string navigation = string.Concat(":/", filename, ":/", ApiConstants.UploadCreateSessionAction);
            Uri serviceUri = UriForItemReference(parentItemReference, navigation);
            return await StartLargeFileTransfer(serviceUri, sourceFileStream, options);
        }
public async Task < ODItem > UploadLargeFileAsync ( ODItemReference parentItemReference , string filename , Stream sourceFileStream , ItemUploadOptions options ) { if ( ! parentItemReference . IsValid ( ) ) throw new ArgumentException ( " " ) ; if ( string . IsNullOrEmpty ( filename ) ) throw new ArgumentNullException ( " " ) ; if ( ! filename . ValidFilename ( ) ) throw new ArgumentException ( " " ) ; if ( null == sourceFileStream ) throw new ArgumentNullException ( " " ) ; if ( null == options ) throw new ArgumentNullException ( " " ) ; string navigation = string . Concat ( " " , filename , " " , ApiConstants . UploadCreateSessionAction ) ; Uri serviceUri = UriForItemReference ( parentItemReference , navigation ) ; return await StartLargeFileTransfer ( serviceUri , sourceFileStream , options ) ; }
Uploads a file using the resumable fragment upload API, splitting the file into smaller pieces to upload.
Uploads a file using the resumable fragment upload API splitting the file into smaller pieces to upload .
None
parentItemReference
ODItemReference
None
filename
string
None
sourceFileStream
Stream
None
options
ItemUploadOptions
None