Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 62692 invoked from network); 9 Apr 2010 14:24:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Apr 2010 14:24:47 -0000 Received: (qmail 70673 invoked by uid 500); 9 Apr 2010 14:24:46 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 70518 invoked by uid 500); 9 Apr 2010 14:24:45 -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 70510 invoked by uid 99); 9 Apr 2010 14:24:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Apr 2010 14:24:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 74.125.83.180 as permitted sender) Received: from [74.125.83.180] (HELO mail-pv0-f180.google.com) (74.125.83.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Apr 2010 14:24:39 +0000 Received: by pvc22 with SMTP id 22so2056109pvc.11 for ; Fri, 09 Apr 2010 07:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=fs25gDAe0LvB/pjQyPLPoM1LR2+obkjIsWHJ4V56q4w=; b=iAqQVXSjvBGqytsqXcAnoJSptkJr8ACv2oQeYB3b9hztB8YQ30UAYpZ6QMsdNsiFMi 3RZs7O4+mg962FA4IuVhS2P3ACua+3eONYVZqnwofcJ3Gq9YMSCtcOHX8inKy9+i7kx3 BEIj9YqyzYVcYSOXpWPLz/5jUuMnWVa1F5Bok= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=WdimoLWBzm59+zM7i2oaYz2hP4sxNiiAqy74ouBA/XsilAWhfPI+QaZYxA0qK+2gBz 2dd27Mo0Xg4X6e5WZHfF1k88HVRgf5ulvGe8IduySHm8auvC3/Pq4SU6PJCLD16XX5am QPGQi+wy25e7jxbW3jZhOdI2W307OnVNzfJnc= MIME-Version: 1.0 Received: by 10.140.225.21 with HTTP; Fri, 9 Apr 2010 07:24:18 -0700 (PDT) Date: Fri, 9 Apr 2010 16:24:18 +0200 Received: by 10.141.101.21 with SMTP id d21mr195496rvm.95.1270823058708; Fri, 09 Apr 2010 07:24:18 -0700 (PDT) Message-ID: Subject: attachment upload API consistency From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Hi all, I'm finding annoying the lack of consistency in attachments upload API and would like to think on a solution for it? Inconsistency : POST /database/docid accept form-data non streamed with futon hack (_doc, _attachments) PUT /doc/docid accept multipart-form streamed (somehow) first file is content-type json -> doc other are attachments standalone API : PUT /db/docid/attachmentd DELETE /db/docid/attachmenet standalone api is ok in term of REST imo, but not the first one. Also the fact that attachments aren't really streamed on POST is a problem for CouchApps. I think We want form-multipart too streamed on POST. So we can eventually handle all uploads in CouchApps. Another possibility would be an _attachment handler : POST /db/_attachment/docid .... Any thoughts ? If I provide needed code (sometimes in the coming week) would it enter in 1.0 ? - benoit