carbureted/react-native-pouchdb

pouchdb mangles base64 on `db.get(id, {attacments: true})`

Opened this issue · 0 comments

Thank you for react-native-pouchdb!

I'm having problems with base64 encoded attachments. These are my steps:

  1. I upload a jpg in base64 to CouchDB (with content_type either text/plain or image/jpeg).
  2. I look inside CouchDB (using _utils), the attachment is the correct base64 encoding.
  3. CouchDB syncs with PouchDB
  4. However, on the react-native side, when I do
db.get(id, {attachments: true})

Then the resulting doc's _attachments's data contains a different string (ie, it appears to have been mangled).