Github user cooperjbrandon commented on the issue:

    https://github.com/apache/cordova-plugin-file-transfer/pull/141
  
    I have this same exact issue trying to upload to s3. I also got the error 
message :
    ```
    You must provide the Content-Length HTTP header.
    ```
    
    TLDR: `options.chunkedMode = false;` fixes it.
    
    Longer:
    Not exactly sure, but maybe s3 doesn't like the `Transfer-Encoding` header? 
When doing
    `conn.setFixedLengthStreamingMode(fixedLength);`, I no longer get a 411. 
This is accomplished by setting `chunkedMode` to false. By doing that, this 
line runs: 
https://github.com/apache/cordova-plugin-file-transfer/blob/master/src/android/FileTransfer.java#L442
 .
    
    Another possibility is that s3 does allow chunked mode, but we need to set 
additional  headers on the request to make it work.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to