Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Would like a simple way to create an attachment for a new document #42

lenkawell opened this Issue · 0 comments

1 participant


These two lines of code do not work, but I have yet to find a simple way to create a new document and an attachment.

CouchRevision* revision = [self.database documentWithID:name].currentRevision;
CouchAttachment* attachment = [revision createAttachmentWithName:@"photo" type:@"image/jpeg"];

The problem is that .currentRevision appears to return nil for an new (unsaved) document. I see that CouchModel cheats with a private CouchAttachment.initWithParent:name: metadata: method, so there seems to be a general need to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.