cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP MDK offline iOS: Attachment UploadStream failed during sync

alqp
Discoverer
0 Likes
633

Hello,

I am currently developing an application where you can upload attachments from both mobile and web and it also works in offline mode.
The MDK version is 24.4.0

I use odata V4 and the field that contains the content of the attachments is of type "Edm.Stream".

To upload attachments, first I create the attachment record without the "Edm.Stream" field, then to upload the attachment content I use "Action.Type.UploadStream" and for viewing I use "Action.Type.OpenDocument"

On Web it is working properly and saves the attachment content in the db.

From mobile (in offline mode), especially from iOS devices, the attachment is loaded and can be viewed. But, at the time of synchronization the attachment record is loaded into the db and then the method that inserts the attachment content fails. The error is the following:

Sync offline data service failure - Error:[-10340] The upload failed due to an error on the server: -857 (SERVER_SYNCHRONIZATION_ERROR) ([-10225] Message: User exception: Cannot invoke "String.toLowerCase()" because "contentType" is null)

Thank you in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

PAstolfi86
Explorer
0 Likes

@bill_froelich and @Jitendra_Kansal78 could you help us?

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Likes
Would need more details on how the action is configured