MediaCreateOptions Class

Specifies options to use for creating Media Resources.

Namespace: powerGate.Erp.Client
Assembly: powerGate.Erp.Client.dll

Inheritance Hierarchy

System.Object
powerGate.Erp.Client.MediaCreateOptions

Syntax

1
public class MediaCreateOptions

The MediaCreateOptions type exposes the following members.

Constructors

Name

Description

../../../_images/method.ico MediaCreateOptions()

Initializes a new instance of the MediaCreateOptions class.

Properties

Type

Name

Description

../../../_images/prop.ico string

ContentType

Specifies the content type of the HTTP request.

../../../_images/prop.ico Stream

Data

Stream of Data to upload to the ERP System.

../../../_images/prop.ico Dictionary<string, object>

Properties

The properties for the entity beeing created. Those are passed as Slug-Header to the ERP System.

Remarks

The ContentType is used to specify the nature of the Data being uploaded. With the appropriate content type the web browser can open the Data with the proper extension/plugin.
If the content type contains text (e.g text/plain, text/html…) as type or json , xml (e.g application/json, application/xml…) as subtype, then the content of the Data is uploaded to the server as UTF-8 Encoded text.

The Properties are passed as Slug-Header to the server, in the augmented BNF syntax.
Please note, that the field-values are passed in JSON-format (depending on the OData-version) to the server. The Slug header is send as defined in Atom Publishing Protocol by encoding the data to UTF-8 and later using percent encoding (for all octets outside the ranges %20-24 and %26-7E)!

Note

All Properties are formatted in following format: Property1='SomeText',Property2=666
This format is supported by SAP and powergateserver. Note that other ERP systems could expect data in different format!

See also

Reference