BackgroundTransferRequest.UploadLocation Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the location from which the requested file will be uploaded.

Namespace:  Microsoft.Phone.BackgroundTransfer
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public Property UploadLocation As Uri
public Uri UploadLocation { get; set; }

Property Value

Type: System..::.Uri
The location from which the requested file will be uploaded

Remarks

Warning

To help isolate the files to which the background transfer service has access, all transfers must be uploaded from a file within the \shared\transfers directory in the application’s isolated storage. You may add additional directories under this directory, but attempting to set a URI that is outside of the transfer directory will throw an exception.

The maximum file size supported for uploads is over a cellular connection is 5 MB. Over Wi-Fi with battery power the maximum is 20 MB. Over Wi-Fi with external power, the maximum is 100MB.

This method may throw one of the following exceptions.

InvalidOperationException

A transfer request’s properties cannot be modified after it has been submitted or disposed.

NotSupportedException

The path must point to a location within the \shared\transfers directory. Only relative URIs are supported. The path cannot be zero length.

ArgumentException

The path must end with a file name.

The specified Uri must be of type UriKind.Relative. Absolute paths using the “isostore:” Uri schema are not supported.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

BackgroundTransferRequest Class

Microsoft.Phone.BackgroundTransfer Namespace