You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2021/04/20 07:38:21 UTC

[GitHub] [cordova-plugin-file-transfer] max763 opened a new issue #301: ios is sending cr cf

max763 opened a new issue #301:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/301


   # Bug Report
   
   ## Problem
   When sending a file via android to a esp32 device  everything is working fine. With iOS the transmitted data has extra cf and lf at the beginning.
   0x0d,0x0a,  original data starts here...
   ### What is expected to happen?
   A correct file upload on iOS. 
   
   
   ### What does actually happen?
   extra two bytes are stuffed at the beginning of the transmitted data.
   It may also be that the webserver code of the esp32 is handling the http request differently but at least some differences on ios must lead to that behavior.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   var options = new FileUploadOptions();                                                                                  
   options.fileKey = "file";     
   options.chunkedMode=false;  
   options.mimeType="application/octet-stream"; 
   options.httpMethod="POST"; 
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   The issue was only observed using iOS
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Cordova version 10.0.0
   cordova-plugin-file-transfer 1.7.1 "File Transfer"
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x ] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x ] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] max763 closed issue #301: ios is sending cr cf

Posted by GitBox <gi...@apache.org>.
max763 closed issue #301:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/301


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] max763 commented on issue #301: ios is sending cr cf

Posted by GitBox <gi...@apache.org>.
max763 commented on issue #301:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/301#issuecomment-823168826


   meanwhile I changed CDVFileTransfer.m for ios and it's working now
   `    if (mimeType != nil) {                                                                                              
             //[postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n", mimeType] dataUsingEncoding:NSUTF8StringEnco
     ding]];
             [postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n\r\n", mimeType] dataUsingEncoding:NSUTF8StringEn
     coding]];
         }                                                                                                                   
         //[postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Length: %ld\r\n\r\n", (long)[fileData length]] dataUsingEncodin
     g:NSUTF8StringEncoding]];    `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org