[ 
https://issues.apache.org/jira/browse/COUCHDB-1721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Quentin Raynaud updated COUCHDB-1721:
-------------------------------------

    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.

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

The problem is: when I upload a document, if a 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.

    
> attachment length is "undefined" in validate_doc_update but updates before 
> first get
> ------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-1721
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1721
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Quentin Raynaud
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to