Sync gateway / Ionic 2: Image attachment not working

Hi everyone,

I am new to sync gateway and I am encountering an issue on saving an attachment of image to sync gateway. It is not working on the actual devices such as Ipad and Samsung Tab but when I used android emulator for some reason its working fine.

Here is the JSON file before saving to sync gateway:

{
“_attachments”:{
“sample1.jpg”:{
“content_type”:“image/jpg”,
“digest”:“sha1-jh0LK5gecupRnKMVAcRnwvLT7A8=”,
“length”:11076,
“revpos”:7,
“stub”:true
},
“sample2.jpg”:{
“content_type”:“image/jpg”,
“digest”:“sha1-ZTgpbzOh1wdzOPZ2AnlhLldqcM8=”,
“length”:18545,
“revpos”:7,
“stub”:true
},
“Needtosave.jpg”:{
“content_type”:“image/jpg”,
“data”:"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDA…"
}
}
}

Here is the document on the sync gateway after saving:

{
“_attachments”: {
“sample1.jpg”: {
“content_type”: “image/jpg”,
“digest”: “sha1-jh0LK5gecupRnKMVAcRnwvLT7A8=”,
“length”: 11076,
“revpos”: 5,
“stub”: true
},
“sample2.jpg”: {
“content_type”: “image/jpg”,
“digest”: “sha1-ZTgpbzOh1wdzOPZ2AnlhLldqcM8=”,
“length”: 18545,
“revpos”: 7,
“stub”: true
}
},
“folders”: [
{
“file”: “folder1”,
“files”: [
{
“file”: “sample1.jpg”,
“title”: “sample1.jpg”
}
]
},
{
“file”: “folder2”,
“files”: [
{
“file”: “sample2.jpg”,
“title”: “sample2.jpg”
}
]
}
],
“_rev”: “7-e5bda53afe9f1366c1de0d472003486f”,
“_id”: “xxx_app-20160202T150405-150287956388-20170921T141032”
}

Any thoughts about this? I hope you could help me regarding this matter. Thanks in advance