Skip to Content

Uploading Video to SAP Gateway

Hello everybody,

I'm currently having an issue with uploading files via SAP Netweaver Gateway.

What I'm trying to do is to capture a video and sending it to SAP Gateway. I'm coding in JAVA and I'm using the odata4j-Framework for consuming and producing OData. My current tries involved to encode the video to a base64-String and sending the string to the gateway... The encoding of the video works quite fine but the prolbem is that the string is really veeeeeeeeery huge ... Everytime when I'm trying to make the request I receive a "OutOfMemoryException".

Is there actually a way with which I'm able to send a video file with odata4j to the SAP Netweaver Gateway??? I'm really looking forward to your help!!!

Greetings

Stefan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Nov 19, 2014 at 07:51 AM

    Hi Stefan,

    Even I also facing the same issue with data size limit while uploading MP4 files..We can expect answers from GW Experts.

    Thanks,

    Syam

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Stefan Heitzer

      Hi Stef,

      Your problem is that you are assigning the content as a property of an entity. Video is "media stream" content so you have to use the streaming functions of the framework. Your entity properties should contain the key and metadata of the content, but the actual content is treated as the entity 'value' and is not a property.

      Streaming applies to any "file" content, and since your video is a binary file you can use the same techniques as outlined in some of the articles in this space.

      Uploading Files to SAP GW, Downloading Files from SAP GW - New Techniques

      Cheers

      Ron.

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2014 at 02:35 PM

    Hello Stefan,

    Set your entity as Media Type.

    You need not to convert to any type of string format and send to GW.

    All you need to do is attach the files in GW Client and fire the service which will intern call Create_Stream method.

    Inside this method you need to write the logic which will save your files in the appropriate format in back-end.

    Regards,

    Ashwin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2014 at 05:31 PM

    Hi and thanks a lot for your quick replies! The questions which I have right now is how to send the video. I get it as a mp4 file and I'm using odata4j. The framework itself provides a methode "createEntity" with all the properties I declare in the GW. My guess is as I already mentioned that the string is too big --> I need to send the video directly, but how can I make this?

    Looking forward to your answers!

    Greetings

    Stef

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 07, 2014 at 07:53 PM

    Hi,

    here's a short news update... I still haven't found a solution for sending the video to the gateway ... maybe someone knows something?

    Greetings

    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.