mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-05-12 00:03:02 +08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user