attachments not pulling to TouchDB #12

Closed
jchris opened this Issue Jan 23, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@jchris
Contributor

jchris commented Jan 23, 2013

It looks like TouchDB is doing this, and not getting the attachment back.

curl 'http://jchris:jchris@localhost:4984/sync_gateway/3685C224-0056-46E8-A234-DE121E441E14?rev=2-9f85dd7a2b0a5d8ba08097918181e95e&revs=true&attachments=true&atts_since=%5B%221-fee61c00c35908d65e79d30798363f49%22%5D' 

It should be getting the attachment body, but it's not. If I remove the atts since, I get the body inline in base64.

Here is the response to the request with att_since specified:

{"_attachments":{"photo.jpg":{"content_type":"image/jpg","digest":"sha1-SeNdYuBu6eswUmmB+B2C9qj0CPs=","length":13296,"revpos":2,"stub":true}},"_id":"3685C224-0056-46E8-A234-DE121E441E14","_rev":"2-9f85dd7a2b0a5d8ba08097918181e95e","_revisions":{"ids":["9f85dd7a2b0a5d8ba08097918181e95e","fee61c00c35908d65e79d30798363f49"],"start":2},"author_id":"jchris","created_at":"2013-01-22T19:48:21.839Z","seq":0,"text":"","thread_id":"cjf3bhbag199","type":"message","updated_at":"2013-01-22T19:48:21.839Z"}

@ghost ghost assigned snej Jan 23, 2013

@snej

This comment has been minimized.

Show comment Hide comment
@snej

snej Jan 24, 2013

Member

Something's going wrong when the attachmentsSince parameter to Database.GetRev is a non-empty array; looks like the ancestor string returned from doc.History.findAncestorFromSet is wrong...

Member

snej commented Jan 24, 2013

Something's going wrong when the attachmentsSince parameter to Database.GetRev is a non-empty array; looks like the ancestor string returned from doc.History.findAncestorFromSet is wrong...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment