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
TypeError: DatamustbeastringorabufferatHash.update(crypto.js:97)atbinaryMd5(index.es.js:15)atpreprocessBlob(index.es.js:211)atpreprocessAttachment(index.es.js:240)ateval(index.es.js:271)atArray.forEach(<anonymous>)
at preprocessAttachments (index.es.js:253)
at idbBulkDocs (index.es.js:300)
at PouchDB.idb_bulkDocs [as _bulkDocs] (index.es.js:1471)
at PouchDB.eval (index.es.js:1024)
Case
Add attachment.
Issue
Icorrect working attachments in electron-render. Webpack 4.
Info
Code
Throw error
Here create blob, not buffer.
rxdb/src/plugins/attachments.js
Lines 41 to 55 in 80ce6b2
pouchdb-md5 expect buffer.
https://github.com/pouchdb/pouchdb/blob/7c0988c0ae6b773e2a81554b1b49ffe74471ce97/packages/node_modules/pouchdb-md5/src/binaryMd5.js#L3-L6
But in package.json for browser used other file. Webpack with target "electron-renderer" don't use "browser" files.
https://github.com/pouchdb/pouchdb/blob/7c0988c0ae6b773e2a81554b1b49ffe74471ce97/packages/node_modules/pouchdb-md5/package.json#L11-L15
I can fix it if in webpack add alias
But will better if createBlobBuffer function in rxdb will depend from target via package.json.
The text was updated successfully, but these errors were encountered: