cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cooperjbrandon <...@git.apache.org>
Subject [GitHub] cordova-plugin-file-transfer issue #141: CB-10974 Cordova file transfer Cont...
Date Wed, 05 Apr 2017 07:22:02 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message