Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82C3510F04 for ; Sun, 11 Jan 2015 19:28:33 +0000 (UTC) Received: (qmail 74977 invoked by uid 500); 11 Jan 2015 19:28:34 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 74916 invoked by uid 500); 11 Jan 2015 19:28:34 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 74905 invoked by uid 99); 11 Jan 2015 19:28:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Jan 2015 19:28:34 +0000 Date: Sun, 11 Jan 2015 19:28:34 +0000 (UTC) From: "Anthony Ananich (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-1705) Update Function does not parse multipart/form-data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14273019#comment-14273019 ] Anthony Ananich commented on COUCHDB-1705: ------------------------------------------ Actually there is no need to decode them. We can simply add them to _attachments where base64-encoded string is needed: http://docs.couchdb.org/en/1.6.1/api/document/common.html#attachments > Update Function does not parse multipart/form-data > -------------------------------------------------- > > Key: COUCHDB-1705 > URL: https://issues.apache.org/jira/browse/COUCHDB-1705 > Project: CouchDB > Issue Type: Bug > Components: JavaScript View Server > Affects Versions: 1.2.1, 1.6.1 > Reporter: Anthony Ananich > Attachments: base64.patch > > > I have a design doc and update handler. > {quote} > function(doc, req) { > log(req); > var newdoc = {}; > ... > return [newdoc, \{ > code: 200, > body: req.uuid > }]; > } > {quote} > I made a HTML file with the following form > {quote} >
>
> >
> {quote} > In the log file I can see that POST request body exists, but was not parsed: > {quote} > { "body" : "------WebKitFormBoundaryE6xRBni3g8MNw14P\r\nContent-Disposition: form-data; name=\"classname\"\r\n\r\nABC\r\n------WebKitFormBoundaryE6xRBni3g8MNw14P--\r\n", > "form" : { }, > ... > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)