cancel
Showing results for 
Search instead for 
Did you mean: 

Image not displayed in the response

0 Kudos

Hello,

I am trying to fetch image via odata service. To do this i have redefined GET_STREAM and filled the raw  data and using below GET request.

/sap/opu/odata/SAP/ZTESTATTACHMENTS_SRV/AttachmentSet(Pernr='12345678')/$value.

I get the status code = 200, but in the response body i only see <RESPONSE_BODY/>, can't see photo..what could have gone wrong...

Regards

Pradeep

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Pradeep,

Please check if appropriate mime_type is sent back in GET_STREAM method.


Say for example,

If file is 'jpeg' then with value, mime type should be mapped back so that it will be rendered correctly.


DATA: ls_stream TYPE ty_s_media_resource.


ls_stream-value = <value>.

ls_stream-mime_type = 'image/jpeg'.

Regards,

Ashwin

Answers (0)