You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Prashanth (JIRA)" <ji...@apache.org> on 2015/05/20 09:53:00 UTC
[jira] [Updated] (OLINGO-662) Attachments support in olingo
[ https://issues.apache.org/jira/browse/OLINGO-662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Prashanth updated OLINGO-662:
-----------------------------
Issue Type: Bug (was: Question)
> Attachments support in olingo
> -----------------------------
>
> Key: OLINGO-662
> URL: https://issues.apache.org/jira/browse/OLINGO-662
> Project: Olingo
> Issue Type: Bug
> Components: MISC, odata2-annotation, odata2-core, odata4-server
> Affects Versions: V2 2.0.3
> Reporter: Prashanth
> Priority: Blocker
> Labels: attachments
>
> This question is about the support for attachments uploading and downloading via Olingo Service ( Olingo V2 2.0.3 ). I have gone the olingo docs but didn't find any clue on how to provide support for uploading and downloading of attachments using olingo .
> Does olingo supports this functionality ? If olingo supports , how to implements this ?
> Following are some basics which i came to know by debugging the core library :
> -> Media type support : We can provide support for custom content types by overriding the method getCustomContentTypes() in processor class.
> -> Implementation : we can implement createEntity as following in processor class :
> @Override
> public ODataResponse createEntity(PostUriInfo uriInfo, InputStream content,
> String requestContentType, String contentType) throws ODataException { ... }
>
> But here content is giving the requestBody , not actual file/attachment.
> Note : Here the support for attachments means - ex : in case of Rest , CXF provides some api which can be seen in following snippet :
> @POST
> @Consumes( {MediaType.MULTIPART_FORM_DATA })
> @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
> public Response create(@Context HttpHeaders httpHeaders, @Context UriInfo uriInfo,
> MultipartBody multipartBody)
> Here @Consumes media type provides consumption of multipart formdata and MultipartBody parameter can give us the attachments.
> Similar to above , Does Olingo V2 2.0.3 provides any API ?How can we implement the support for attachments in Olingo V2 2.0.3 ? Please share us an example !
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)