Modify android HTTP upload sequence for uniformity with IOS

Date: Feb2018

Description
Android cordova-plugin-advanced-http 'upload' sequence was modified:
- to respect the order of operations some sites requires, like amazonaws.com
- to have the same behaviour as the IOS counterpart.

Tests
Manual manipulations on Android and PC
This commit is contained in:
Johny101
2018-02-16 12:59:45 -05:00
committed by GitHub
parent 3f1ee62088
commit 9c34f47624
@@ -54,8 +54,6 @@ class CordovaHttpUpload extends CordovaHttp implements Runnable {
MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
String mimeType = mimeTypeMap.getMimeTypeFromExtension(ext);
request.part(this.name, filename, mimeType, new File(uri));
Set<?> set = (Set<?>)this.getParamsMap().entrySet();
Iterator<?> i = set.iterator();
@@ -72,6 +70,8 @@ class CordovaHttpUpload extends CordovaHttp implements Runnable {
return;
}
}
request.part(this.name, filename, mimeType, new File(uri));
this.returnResponseObject(request);
} catch (URISyntaxException e) {