ArcGIS Runtime SDK for WPF - Library Reference
AddItemTaskAsync(ArcGISPortalItem,StreamContent,Stream,String) Method
See Also 
ESRI.ArcGIS.Client.Portal Namespace > ArcGISPortal Class > AddItemTaskAsync Method : AddItemTaskAsync(ArcGISPortalItem,StreamContent,Stream,String) Method

portalItem
The portal item to add.
fileContent
The file content to upload.
thumbnail
The thumbnail of the item.
folderId
The user folder ID (root folder by default)
Adds an item with a file content asynchronously. This operation is used to upload an item file to the specified user folder depending on documented Item Types. This operation is available only to authenticated users.

The user automatically becomes the owner of the item. The item by default is flagged as private (e.g., not shared with any group). This can be changed with the share item operation.

The url used for an item must be unique within the particular user's folder.

Syntax

Visual Basic (Declaration) 
Public Overloads Function AddItemTaskAsync( _
   ByVal portalItem As ArcGISPortalItem, _
   ByVal fileContent As ArcGISWebClient.StreamContent, _
   Optional ByVal thumbnail As Stream, _
   Optional ByVal folderId As String _
) As Task(Of ArcGISPortalItem)

Parameters

portalItem
The portal item to add.
fileContent
The file content to upload.
thumbnail
The thumbnail of the item.
folderId
The user folder ID (root folder by default)

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.