Skip to Content

File upload using ODataModel

Hi all,

My HANA table "FILE" has metadata fields (e.g. filename) and a binary field which I'd like to use for file storage i.e. one file for each row.

I'd like to upload files from a UI5 web app: I can expose my table as OData but I'm not sure about the next step.

I would like to create the new record containing the binary data using the create() method from the ODataModel by UI5.

In this example a .xsjs script is used to perform explicit upload, but it does not leverage the ODataModel.

I would highly value if anyone could share any known best practice on how to do this.

Can anyone please assist?

Thanks, regards


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 09, 2014 at 04:15 PM

    Hi Vincenzo,

    What you need is a Media Entity in your OData service.

    Read about Media Link Entries/Media Resources within

    Hana OData designer should have ways to expose media entities.

    SAP Netweaver Gateway's way of handling is here. You need to find a similar way within HANA environment.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.