You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Shakhnazarov (JIRA)" <ji...@apache.org> on 2015/11/05 08:48:27 UTC

[jira] [Resolved] (CB-7566) FileTransfer: Doc incorrectly says that mimeType defaults to "image/jpeg"

     [ 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