Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF28218591 for ; Tue, 10 Nov 2015 23:28:11 +0000 (UTC) Received: (qmail 2035 invoked by uid 500); 10 Nov 2015 23:28:11 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 1990 invoked by uid 500); 10 Nov 2015 23:28:11 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 1522 invoked by uid 99); 10 Nov 2015 23:28:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Nov 2015 23:28:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 55DB52C1F83 for ; Tue, 10 Nov 2015 23:28:11 +0000 (UTC) Date: Tue, 10 Nov 2015 23:28:11 +0000 (UTC) From: "Jason Ginchereau (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CB-7120) File incompatible with XHR2 FormData 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/CB-7120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999581#comment-14999581 ] Jason Ginchereau edited comment on CB-7120 at 11/10/15 11:28 PM: ----------------------------------------------------------------- Consider making the file plugin generally compatible with the W3C File API draft standard at http://www.w3.org/TR/FileAPI/. That would make it work better with other APIs such as XHR2 FormData that can use Files and Blobs. was (Author: jasongin): Consider making the file plugin generally compatible with the [W3C File API draft standard](http://www.w3.org/TR/FileAPI/). That would make it work better with other APIs such as XHR2 FormData that can use Files and Blobs. > File incompatible with XHR2 FormData > ------------------------------------ > > Key: CB-7120 > URL: https://issues.apache.org/jira/browse/CB-7120 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File > Affects Versions: 3.5.0 > Environment: Android 4.4.2 > Reporter: Morgan Allen > Labels: Triaged > > Scenario. > Using the Camera API to load a File (from FileEntry) > Upload File using angular-file-upload > Which uses FormData to upload via XHR > I haven't had time to boil this down to a test case yet but here is what I have. > {code:title=File Input Request Payload} > ------WebKitFormBoundary8InTUnt3DiGk5CgN > Content-Disposition: form-data; name="file"; filename="AngularJS-large.png" > Content-Type: image/png > ------WebKitFormBoundary8InTUnt3DiGk5CgN-- > {code} > {code:title=Phonegap File Request Payload} > ------WebKitFormBoundaryfFYuBlWwlPwVCVzp > Content-Disposition: form-data; name="file" > [object Object] > ------WebKitFormBoundaryfFYuBlWwlPwVCVzp-- > Response Headersview source > {code} > And inspecting each object shows the Phonegap File is not derived from a Blob as the browser implementation is. > {code:title=FormData.append API} > void append(DOMString name, File value, optional DOMString filename); > void append(DOMString name, Blob value, optional DOMString filename); > void append(DOMString name, DOMString value); > {code} > Maybe this is causing a serialization issue? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org