mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-06-05 00:00:35 +08:00
CB-10974 Cordova file transfer Content-Length header problem
Fixed iOS logic to not to include Content-Length when chunkedMode=true Fixed Android logic preventing chunkedMode to be enabled for http uploads Added tests for chunkedMode Documented chunkedMode not supported on Windows Documented Uploading of an empty file is not supported for chunkedMode=true and multipart=false for iOS, pended the corresponding test
This commit is contained in:
@@ -426,7 +426,7 @@ public class FileTransfer extends CordovaPlugin {
|
||||
// setFixedLengthStreamingMode causes and OutOfMemoryException on pre-Froyo devices.
|
||||
// http://code.google.com/p/android/issues/detail?id=3164
|
||||
// It also causes OOM if HTTPS is used, even on newer devices.
|
||||
boolean useChunkedMode = chunkedMode && (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO || useHttps);
|
||||
boolean useChunkedMode = chunkedMode || (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO || useHttps);
|
||||
useChunkedMode = useChunkedMode || (fixedLength == -1);
|
||||
|
||||
if (useChunkedMode) {
|
||||
|
||||
Reference in New Issue
Block a user