-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give .load() the ability to accept strings #73
Comments
Old thread, but this needs clarification. They probably should have clarified this in the ReadMe but this can only work server-side (node.js) since javascript has no ability to save files on the client side. Based on your code, it looks like you were trying to use this for an app (as I was when I came across the library) but it won't work without a server-side connection to store files. Unless somebody knows of some magic I don't. |
PouchDB and pouchdb-replication-stream included via script tags at top of page.
Calling
targetDB.load(sourceString)
results in an error ofreadableStream.pipe is not a function
.I can use pouchdb-load with the same dbDumpTxt file, but it seems to cause a slew of network activity following the .load (even with proper proxy option supplied), so I'm trying to see if pouchdb-replication-stream's .load() is better.
Has anyone else run into this .pipe() issue?
Looks like it's because .load() expects a STREAM, not a STRING. I've just dug into learning about streams (Node.js, BufferedStreams, HighLander, mozilla developer versiosn), and it looks like they are slightly different. Any chance that this .load() function could be modified to also accept an input string, as that is what .dump() creates?
The text was updated successfully, but these errors were encountered: