Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1721

attachment length is "undefined" in validate_doc_update but updates before first get

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      I wanted to create a specific validate_doc_update preventing to add attachments bigger than a certain size to a document (to defeat possible abuses from users).

      The problem is: when I upload a document, if I log the value of newDoc._attachments.<filename>.length it reports "undefined".

      I believe this is a "bug" since if I use GET on the document just after it is updated with the attachment the length & digest are there. The validate_doc_update should always process the same data that will be served by CouchDB if it does not deny the update.

      NB: I uploaded the attachments using the Futon interface during my tests on the subject

      Attachments

        Activity

          People

            Unassigned Unassigned
            even Quentin Raynaud
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: