[jira] [Commented] (CB-7120) File incompatible with XHR2 FormData

2015-11-10 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-7120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14999581#comment-14999581
 ] 

Jason Ginchereau commented on CB-7120:
--

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: Bug
>  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-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-7120) File incompatible with XHR2 FormData

2014-07-11 Thread Morgan Allen (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-7120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14059452#comment-14059452
 ] 

Morgan Allen commented on CB-7120:
--

FWIW Passing a Blob to FormData.append works as expected.

 File incompatible with XHR2 FormData
 

 Key: CB-7120
 URL: https://issues.apache.org/jira/browse/CB-7120
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File
Affects Versions: 3.5.0
 Environment: Android 4.4.2
Reporter: Morgan Allen

 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.2#6252)