Skip to main content
AtomPubClient.CreateMediaResourceAsync | createMediaResourceAsync method

Creates a new media resource in the specified collection.

Syntax


atomPubClient.createMediaResourceAsync(uri, mediaType, description, mediaStream).done( /* Your success and error handlers */ );

public IAsyncOperationWithProgress<SyndicationItem, TransferProgress> CreateMediaResourceAsync(
  Uri uri, 
  string mediaType, 
  string description, 
  IInputStream mediaStream
)

Public Function CreateMediaResourceAsync(
  uri As Uri,  
  mediaType As String,  
  description As String,  
  mediaStream As IInputStream 
) As IAsyncOperationWithProgress(Of SyndicationItem, TransferProgress)

public:
IAsyncOperationWithProgress<SyndicationItem, TransferProgress>^ CreateMediaResourceAsync(
  Uri^ uri, 
  String^ mediaType, 
  String^ description, 
  IInputStream^ mediaStream
)

Parameters

uri

Type: Windows.Foundation.Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]

The URI of the specified collection in which the new resource should be created.

mediaType

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The type for the media resource.

description

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The description of the new resource that is turned into the Slug: header of the POST request.

mediaStream

Type: IInputStream

Specifies the IInputStream to use as the media resource.

Return value

Type: IAsyncOperationWithProgress<SyndicationItem, TransferProgress>

The object that is used to create the resource asynchronously and to report the progress and completion status of the operation.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Web.AtomPub
Windows::Web::AtomPub [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.AtomPub
Windows::Web::AtomPub [C++]

Metadata

Windows.winmd

See also

AtomPubClient