[
https://issues.apache.org/jira/browse/CB-7566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14226680#comment-14226680
]
Lucas Gonze commented on CB-7566:
---------------------------------
Current:
- __mimeType__: The mime type of the data to upload. Defaults to
`image/jpeg`. (DOMString)
Proposed new:
- __mimeType__: The mime type of the data to upload. Defaults to
`image/jpeg`, blank, or the OS default association, depending on platform.
(DOMString)
> 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: [email protected]
For additional commands, e-mail: [email protected]