Skip to content
Upload attachments straight to a CouchDB database from PhoneGap
Objective-C JavaScript
Latest commit e4dbcf2 Apr 20, 2012 @andrewgleave Merge pull request #6 from jpfiset/progress_callback
Progress callback


Enables a Cordova app to push binary attachments straight to a CouchDB database


  1. Put the .h and .m files of the plugin in your Xcode project
  2. Put the .js file to your www folder
  3. Load the .js file in your HTML file, right after loading cordova
  4. In file Cordova.plist, add an entry to array "plugins" key: CouchDBAttachmentUploader value: (String) CouchDBAttachmentUploader


    function(info) { 
        //success callback
    function(error) {
        //failure callback
        contentType: 'image/jpeg',
        method: 'put',
        attachmentName: 'photo.jpg',
        progress: function(bytesUploaded, bytesTotal){}
Something went wrong with that request. Please try again.