You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Alex Mantsurov (JIRA)" <ji...@apache.org> on 2015/08/27 21:58:45 UTC
[jira] [Updated] (CB-9563) Mulptipart form data is used even a
header named Content-Type is present
[ https://issues.apache.org/jira/browse/CB-9563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Mantsurov updated CB-9563:
-------------------------------
Description:
I'm uploading media files to Amazon S3.
ft.upload(
path,
url,
function(result) {
console.log(result);
},
function(error) {
console.log(error);
},
{
httpMethod : 'PUT',
fileName : name,
mimeType : type,
chunkedMode : false,
headers: {
'Content-Type' : type,
'x-amz-acl' : 'public-read'
}
}
);
After uploading the binary is wrapped:
--+++++org.apache.cordova.formBoundary Content-Disposition: form-data; name="file"; filename="photo_032.jpg" Content-Type: image/jpeg Content-Length: 43084
{binary data}
--+++++org.apache.cordova.formBoundary--
So, multipart data IS USED, but according to the docs:
if a header named Content-Type is present, multipart form data will NOT be used
Expected result:
if a header named Content-Type is present, multipart form data will NOT be used
was:
I'm uploading media files to Amazon S3.
ft.upload(
path,
url,
function(result) {
console.log(result);
},
function(error) {
console.log(error);
},
{
httpMethod : 'PUT',
fileName : name,
mimeType : type,
chunkedMode : false,
headers: {
'Content-Type' : type,
'x-amz-acl' : 'public-read'
}
}
);
After uploading the binary is wrapped:
--+++++org.apache.cordova.formBoundary Content-Disposition: form-data; name="file"; filename="photo_032.jpg" Content-Type: image/jpeg Content-Length: 43084
{binary data}
--+++++org.apache.cordova.formBoundary--
> Mulptipart form data is used even a header named Content-Type is present
> ------------------------------------------------------------------------
>
> Key: CB-9563
> URL: https://issues.apache.org/jira/browse/CB-9563
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File Transfer
> Reporter: Alex Mantsurov
>
> I'm uploading media files to Amazon S3.
>
> ft.upload(
> path,
> url,
> function(result) {
> console.log(result);
> },
> function(error) {
> console.log(error);
> },
> {
> httpMethod : 'PUT',
> fileName : name,
> mimeType : type,
> chunkedMode : false,
> headers: {
> 'Content-Type' : type,
> 'x-amz-acl' : 'public-read'
> }
> }
> );
> After uploading the binary is wrapped:
> --+++++org.apache.cordova.formBoundary Content-Disposition: form-data; name="file"; filename="photo_032.jpg" Content-Type: image/jpeg Content-Length: 43084
> {binary data}
> --+++++org.apache.cordova.formBoundary--
> So, multipart data IS USED, but according to the docs:
> if a header named Content-Type is present, multipart form data will NOT be used
> Expected result:
> if a header named Content-Type is present, multipart form data will NOT be used
--
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