From user-return-3090-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Jan 25 19:12:07 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 35355 invoked from network); 25 Jan 2009 19:12:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jan 2009 19:12:07 -0000 Received: (qmail 81673 invoked by uid 500); 25 Jan 2009 19:12:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 81633 invoked by uid 500); 25 Jan 2009 19:12:05 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 81617 invoked by uid 99); 25 Jan 2009 19:12:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Jan 2009 11:12:05 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of couchdb@autosys.us designates 216.99.218.149 as permitted sender) Received: from [216.99.218.149] (HELO delora.autosys.us) (216.99.218.149) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Jan 2009 19:11:54 +0000 Received: by delora.autosys.us (Postfix, from userid 1000) id 9002725C333; Sun, 25 Jan 2009 11:11:33 -0800 (PST) Date: Sun, 25 Jan 2009 11:11:33 -0800 From: Michael McDaniel To: user@couchdb.apache.org Subject: Re: Issue with null MIME type for attachments Message-ID: <20090125191133.GQ2826@delora.autosys.us> Mail-Followup-To: user@couchdb.apache.org References: <20090125164143.GA19119@uk.tiscali.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: http://autosys.us User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Jan 25, 2009 at 10:10:10AM -0800, Chris Anderson wrote: > On Sun, Jan 25, 2009 at 8:41 AM, Brian Candler wrote: > > > Is it expected behaviour that a client app can upload an attachment in such > > a way that it cannot be downloaded again? I think the server should either > > fail the upload, or default the MIME type to application/octet-stream. > > This is definitely a bug in Ruby couchapp, but you raise an > interesting question. > > Anyone have a strong opinion on which way to go (default vs error)? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1) If a proper upload is defined that app must provide a MIME type, and none is provided by the app, return an error. 2) Define an upload as "provide your MIME type, or you'll get X". And it wouldn't hurt to send back info to the app that "MIME type was set to X". I suggest '1)' ~Michael > > Chris > > -- > Chris Anderson > http://jchris.mfdz.com -- Michael McDaniel Portland, Oregon, USA http://autosys.us