You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm very new to Pouchdb. While doing some tests, I could'nt make attachment works with Safari but it works fine on Chrome and FireFox. Both adding as a File or as a base64 string fails.
I debug the code to find out that the attachment decoded to binary string (using atob for base64 and readAsBinaryString for File).
My base64 string R0lGODlhMAAwAPf/ANfJ…
But when I grab it back, i only have GIF89a0. Most of the content is not returned.
It looks like Safari do not play well with the binary string… I changed a bit the code avoid the decoding at line 4830 //att.data = atob(att.data); and the encoding res = data;//btoa(data); to stick to base64 all the time and it works OK.
Im on OSX 10.8.5, Safari 6.1 using the latest Pouchdb-nightly.js. I also test with 10.9 with Safari 7 with the same behaviour.
Jeff
The text was updated successfully, but these errors were encountered:
Hi,
I'm very new to Pouchdb. While doing some tests, I could'nt make attachment works with Safari but it works fine on Chrome and FireFox. Both adding as a
File
or as abase64 string
fails.I debug the code to find out that the attachment decoded to binary string (using
atob
for base64 andreadAsBinaryString
for File).My base64 string
R0lGODlhMAAwAPf/ANfJ…
becomes
GIF89a00÷ÿ×ɸ©]#´ ��N��C�Êu*Á…
and get inserted.
But when I grab it back, i only have
GIF89a0
. Most of the content is not returned.It looks like Safari do not play well with the binary string… I changed a bit the code avoid the decoding at line 4830
//att.data = atob(att.data);
and the encodingres = data;//btoa(data);
to stick to base64 all the time and it works OK.Im on OSX 10.8.5, Safari 6.1 using the latest Pouchdb-nightly.js. I also test with 10.9 with Safari 7 with the same behaviour.
Jeff
The text was updated successfully, but these errors were encountered: