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
We are developing an electron application and are using express-pouchdb for syncing between clients. However, we have been experiencing the loss of images that we store as attachments after a client pulls changes from another client. Looking at the network tab of the dev console shows that the GET requests for the attachments return 200 with an empty JSON object in the body instead of the actual binary content.
I think I tracked down the error to the getAttachment function which seems to rely on the fact that node Buffers are returned from the corresponding pouchdb adapter. This seems to be a valid assumption in most node environments. However since we are in a hybrid environment we are able to use IndexedDB (syncing does not work for us with the LevelDB adapter). Thus the adapter returns Blobs which do not seem to be handled correctly.
I submitted a pull-request (#263) that fixes our problem. However, I am not sure if this the right place to fix this since I am unaware of the PouchDB internals.
The text was updated successfully, but these errors were encountered:
We are developing an electron application and are using express-pouchdb for syncing between clients. However, we have been experiencing the loss of images that we store as attachments after a client pulls changes from another client. Looking at the network tab of the dev console shows that the GET requests for the attachments return 200 with an empty JSON object in the body instead of the actual binary content.
I think I tracked down the error to the
getAttachment
function which seems to rely on the fact that node Buffers are returned from the corresponding pouchdb adapter. This seems to be a valid assumption in most node environments. However since we are in a hybrid environment we are able to use IndexedDB (syncing does not work for us with the LevelDB adapter). Thus the adapter returns Blobs which do not seem to be handled correctly.I submitted a pull-request (#263) that fixes our problem. However, I am not sure if this the right place to fix this since I am unaware of the PouchDB internals.
The text was updated successfully, but these errors were encountered: