Skip to content

ODataService DownloadStream

DownloadStream action is used to download data stream of OData Properties with type Edm.Stream from an OData entity.

This action can download multiple Edm.Stream properties' data stream but only from a single entity, therefore, the result of the Target binding should only return a single entity, otherwise an error will be thrown.

This action doesn't support ChangeSet.

Note: This action cannot be used to download the associated data stream of a Media Entity (EntityType with HasStream="true"). Please use Action.Type.ODataService.DownloadMedia instead.

The properties defined in Action are also applicable to this action.

ODataService DownloadStream Properties

Property Type Required
Headers object Optional
Properties string[] Required
RequestOptions RequestOptions Optional
Target LinkQueryTarget Required
_Type const Required


Custom headers to be included as part of the request to the OData Service in key/value pair format

  • type: object


A list of property names with Edm.Stream type in the target entity.

  • type: string[]

All items must be of the type: string


Options for processing of data requests


This action can only be executed on a single entity. therefore the Target specifier must be configured to return only 1 entity, otherwise this action will fail


  • type: const

The value of this property must be equal to:


Action Result

The ActionResult of this action is the data of the downloaded stream.


OData entity with Edm.Stream properties

"HiResPhoto" and "LoResPhoto" properties are Edm.Stream in the following "Product" EntityType:

<EntityType Name="Product">
    <PropertyRef Name="ID"/>
  <Property Name="ID" Type="Edm.String" Nullable="false"/>
  <Property Name="Name" Type="Edm.String"/>
  <Property Name="Price" Type="Edm.Decimal" Nullable="false"/>
  <Property Name="HiResPhoto" Type="Edm.Stream" Nullable="true"/>
  <Property Name="LoResPhoto" Type="Edm.Stream" Nullable="true"/>
Both data stream of "HiResPhoto" and "LoResPhoto" can be downloaded using this action.

Query Options

  "_Type": "Action.Type.ODataService.DownloadStream",
  "Target": {
    "Service": "/MyMDKApp/Services/MyOData.service",
    "EntitySet": "Products",
    "QueryOptions": "$filter=ProductID eq {ProductID}"
  "Properties": ["Picture"]
  "_Type": "Action.Type.ODataService.DownloadStream",
  "Target" : {
    "Service" : "/MyMDKApp/Services/MyOData.service",
    "EntitySet" : "Products",
    "ReadLink": "{@odata.readLink}"
  "Properties": ["Picture"]