QPR Knowledge Base

GetBinaryDataAsStream

Hide Navigation Pane

GetBinaryDataAsStream

Previous topic Next topic No expanding text in this topic  

GetBinaryDataAsStream

Previous topic Next topic JavaScript is required for expanding text Mail us feedback on this topic!  

Comments (...)

Revision history:

Introduced in QPR 8.1

 

Returns binary data as a stream from an object defined in the function call. This function can be used to fetch graphs and embedded data from objects.

 

Synopsis:

 

Stream GetBinaryDataAsStream(string sessionId, string objectId, string attribute, string options)

 

Return Value:

 

A Stream object.

 

Parameters:

 

sessionId: String. ID of an authenticated session.

objectId: String. ID of an object from which binary data is fetched.

attribute: String. Supported binary data attributes:

PG
ograph. Querying this attribute equals to calling GetGraph with the attribute's parameters as the value of the Options parameter. See GetGraph for a list of supported parameters.
oembeddeddata. Returns the data embedded in an information item. Note: To check whether an information item is embedded, query the infoitem.embedtype attribute.
SC
ograph. Querying this attribute equals to calling GetGraph with the attribute's parameters as the value of the Options parameter. See GetGraph for a list of supported parameters.
Portal
oembeddeddata. Returns the data embedded in an embedded attachment. Note that you can use for instance [PO].EmbeddedAttachment to get a list of all embedded attachments in the database.

options: String. List of comma-separated parameters. Language parameters are available similarly as in the QueryObjects function.

 

 

Example Procedure:

 

NOTE: The example below requires Integrated Windows Authentication to be used. Otherwise authentication needs to be done e.g. via JavaScript.

 

<html>

<head>

<title>Binary Attachment</title>

</head>

<body>

<p>Embedded attachment from QPR Web Services Foundation</p>

<a href="http://localhost/QPR81WebServices/MainService.svc/webHttp/GetBinaryDataAsStream?objectId=%22PO.0.686650742%22&attribute=%22embeddeddata%22">View attachment</a>

</body>

</html>

Comments (...)