cancel
Showing results for 
Search instead for 
Did you mean: 

How to store images in Cloud HANA with OData service?

0 Kudos
951

Hey experts,

I'm currently building a custom SAPUI5 app as a CAP project where users should be able to upload screenshots. Those screenshots should then be transferred via an OData V2 service and stored in our Cloud HANA instance. So what is the best way to implement this?
I've heard of the Object Storage Service on Cloud Foundry but this is not an option for me. Currently I'm trying to convert the pictures to base64 data-URLs and store them in a LargeString column on the database. However, while searching online I saw schemas where people used Binary/LargeBinary types. Would that be better? And how would I send binary data via OData? I assume that transferring LargeStrings via OData behaves just as normal strings. Is this correct?

Any help is highly appreciated!

Best regards
Maximilian

Accepted Solutions (0)

Answers (1)

Answers (1)

TobiT
Participant

Maybe you have not seen the sample yet:

https://github.com/SAP-samples/cloud-cap-samples/blob/main/media/srv/media-service.js

Displaying how to upload receive a fileupload by CAP.

vladimirs_semikins
Active Contributor
0 Kudos

additionally CAP has good documentation on media data https://cap.cloud.sap/docs/guides/providing-services#media-data