Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.17 KB

uploadoperation_attachasync_267853378.md

File metadata and controls

35 lines (26 loc) · 1.17 KB
-api-id -api-type
M:Windows.Networking.BackgroundTransfer.UploadOperation.AttachAsync
winrt method

Windows.Networking.BackgroundTransfer.UploadOperation.AttachAsync

-description

Returns an asynchronous operation that can be used to monitor progress and completion of the attached upload. Calling this method allows an app to attach upload operations that were started in a previous app instance.

-returns

Upload operation with callback.

-remarks

While this method can be called from multiple app instances, developers should not attach callbacks from the primary app instance in a background task. This will cause BackgroundTransferHost.exe to hang.

-examples

        function AttachUpload (loadedUpload) {
            try {
                upload = loadedUpload;
                promise = upload.attachAsync().then(complete, error, progress);
            } catch (err) {
                displayError(err);
            }
        };

-see-also