cancel
Showing results for 
Search instead for 
Did you mean: 

Kapsel oData Offline plugin request size issue

neyaz_ahmad2
Discoverer
0 Kudos

Hi Experts,

I have developed one hybrid application using SMP with Kapsel oData Offline plugin. Everything is working fine except posting the request with an image.

If I post the request with image size less than 10 KB it works fine but it doesn't work for large image files( not even 100 KB).

The field type I am using as string in oData service in backend system.

Do we have any settings to change the max size for the requests?

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Neyaz,


I have used Edm.String to transmit a base 64 encoded string of an image from my native Android app. There is a limitation to Edm.String i.e. it is limited to 32767 characters on the offline store (not documented). The limitation of 512 characters mentioned above by David is only applicable when the field is a key field in the service.

That being said, when I started on my project the media resources method was not yet available and I chose not to use it for our implementation. But this is the preferred method so that you don't have the limitation above. Hope this helps!

Regards
Aditya

neyaz_ahmad2
Discoverer
0 Kudos

Hi Aditya,

Thanks for replying. Can you provide any link or documentation for doing the offline image upload through Media Entity?

From which version of SMP 3.0 , this option is supported? I am using SMP 3.0 SP07

Regards,

Neyaz

0 Kudos

Hello Neyaz,


I believe the media resources support was added in SMP 3.0 SDK SP08. Refer this link for details:

Regards,

Aditya

Former Member
0 Kudos

Hello Neyaz,

I have not tried downloading images with Kapsel Offline Plugin, so therefore my answer might be wrong.

If you have a look at http://help.sap.com/saphelp_smp306sdk/helpdata/en/88/9d29b3fac0456b812d86b5794c6e54/content.htm you can see, that Edm.String has a maximum length of 512 characters limitation. Therefore using Edm.String for downloading an image is not a good idea. You could provide a link to your ressource and download it separately.

I suggest you to have a look at in section Binary Data/Attachments. You can find more information here: http://help.sap.com/saphelp_smp308sdk/helpdata/en/00/3a9184ef7e4806ac07afdce6f3f5d9/content.htm

You can see, that SAP is using Edm.Binary for media ressources. I hope this can help you. Good luck.