I am using PouchDB to display information from a Couchbase Server. In the future I want to be able to edit the information, but for now it is simply a data display format. I am using Node.js with PouchDB
The data is provided from an app using Couchbase Lite which pushes information through the Sync Gateway 2.1 (also tried on Sync Gateway 2.5)
I am simply replicating the Couchbase Server to the PouchDB and doing all of my operations from there. This has been working really well, however I just added the ability to add a photo on the app and now the replication is failing because it can’t retrieve the attachment.
You are probably thinking that this sounds like a PouchDB issue, however the issue actually stems from this issue:
Where PouchDB is requested the URL with “/” which for whatever reason Sync Gateway doesn’t recognise when retrieving attachments.
I can confirm this behaviour in a browser, where if I type in
I get a 404
Returns the image correct.
Is there any way that I can get sync gateway to just treat the forward slashes correctly? The solution to use %2F is pretty clunky.