[
https://issues.apache.org/jira/browse/OLINGO-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887702#comment-13887702
]
M Carissimi commented on OLINGO-139:
------------------------------------
Hi Stephan
thank you for the clarification about the use of media resources. It sounds
like we won't be able to use them for our use case.
An alternative approach to support our use case and avoid embedding the binary
data with each request, would be to replace the binary properties with links to
an additional Entity Type which has the binary property (or contains a media
resource). This would mean that binary data is downloaded only when requested
(by following the link) or when the $expand option is defined. How would this
work in the case of uploads (i.e. POST to the Entity Type)? Would the binary
data need to be embedded inline to ensure it is correctly uploaded and the link
is correctly created?
Regards
Miki
> Use of binary data
> ------------------
>
> Key: OLINGO-139
> URL: https://issues.apache.org/jira/browse/OLINGO-139
> Project: Olingo
> Issue Type: Question
> Affects Versions: V2 1.0.0
> Reporter: M Carissimi
> Assignee: Stephan Klevenz
>
> Hello,
> I have read your sample on how to use Media Resources by invoking method
> setHasStream(true) on an EntityType and I can see how this can be used to
> retrieve binary data using $value.
> I am trying to understand how this differs from the use of Binary properties.
> From what I can see, the media content of Binary properties is embedded (in
> an encoded format) in the odata feed, where as media content accessed via the
> $value property is only returned when requested.
> I have a table where binary data is stored in two separate columns. Do I need
> to use Binary properties for these two columns and always embed the encoded
> binary data in the odata feed or can I use the $value method to retrieve
> binary data only when requested? How would I configure this as the
> setHasStream(true) is applicable to the whole EntityType rather than to a
> single property?
> Cheers
> Miki
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)