Skip to content
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

Remove attachement once synced with remote database? #3668

Closed
ronag opened this issue Mar 26, 2015 · 5 comments
Closed

Remove attachement once synced with remote database? #3668

ronag opened this issue Mar 26, 2015 · 5 comments
Labels
enhancement Feature request

Comments

@ronag
Copy link
Contributor

ronag commented Mar 26, 2015

Is this possible? Without actually causing the remote database to delete the attachment as well.

@corps
Copy link

corps commented Mar 27, 2015

You could have a push only PouchDB, and listen for its change events (you get an event emitter from calling push or sync), then delete content locally once the relevant change event details that the attachment has been pushed. (edits: typing poorly for some reason)

@ronag
Copy link
Contributor Author

ronag commented Mar 27, 2015

But when I delete the event locally won't that deletion propagate to the server with the next sync?

@nolanlawson
Copy link
Member

I think what you want is purge(), which is not implemented yet.

@natcohen
Copy link

@ronag I had the same problem with archives... I wanted to be able to delete a document locally while keeping it on the remote server (which is what you want to do with attachments). My suggestion would be to use a different document for your attachment and use this: http://stackoverflow.com/questions/23907966/couchdb-automatic-archiving

Read carefully the comments of the answer. It is a really nice solution! Thanks to 'skiqh'

@daleharvey daleharvey added the enhancement Feature request label Aug 4, 2015
@daleharvey
Copy link
Member

Closing as a dupe - #802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request
Projects
None yet
Development

No branches or pull requests

5 participants