cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shakhnazarov (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-7566) FileTransfer: Doc incorrectly says that mimeType defaults to "image/jpeg"
Date Thu, 05 Nov 2015 07:48:27 GMT

     [ https://issues.apache.org/jira/browse/CB-7566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Shakhnazarov resolved CB-7566.
-------------------------------------
    Resolution: Fixed

Fixed in CB-9790

> FileTransfer: Doc incorrectly says that mimeType defaults to "image/jpeg"
> -------------------------------------------------------------------------
>
>                 Key: CB-7566
>                 URL: https://issues.apache.org/jira/browse/CB-7566
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>            Reporter: Jonathan Aquino
>            Priority: Trivial
>
> The documentation for mimeType at https://github.com/apache/cordova-plugin-file-transfer/blob/master/doc/index.md
says 
> "mimeType: The mime type of the data to upload. Defaults to image/jpeg."
> However, if you look at the code in https://github.com/apache/cordova-plugin-file-transfer/blob/master/src/ios/CDVFileTransfer.m
you will see that mimeType is actually not sent if it is unset:
>     if (mimeType != nil) {
>         [postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n",
mimeType] dataUsingEncoding:NSUTF8StringEncoding]];
>     }
> I recommend changing the doc from "Defaults to image/jpeg." to "If unspecified, no Content-Type
will be sent."



--
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


Mime
View raw message