pouchdb-community / pouchdb-load

Load documents into CouchDB/PouchDB from a dumpfile
Apache License 2.0
120 stars 33 forks source link

Can this load a databases with attachments? #62

Open rjcorwin opened 6 years ago

rjcorwin commented 6 years ago

Has anyone played around with loading databases with large media assets? Perhaps from a single zip file?

8clever commented 6 years ago

I tried to load collection with attachments as images. I'm receive error TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, TypedArray, or DataView. Received type object at Hash.update (internal/crypto/hash.js:58:11) at binaryMd5 (/home/ivan/Desktop/work/cloud-pouchdb/node_modules/pouchdb/lib/index.js:4467:41)

It is because we try to generate hash from attachment which is Buffer {"data":{"type":"Buffer","data": ARRAY }}