mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-04-24 00:00:03 +08:00
feat: add ponyfills to support multipart requests on android webview versions < 50 and iOS versions < 13.2
This commit is contained in:
@@ -2,7 +2,7 @@ module.exports = function init(global, console, messages) {
|
||||
var interface = {
|
||||
checkBlobApi: checkBlobApi,
|
||||
checkFileReaderApi: checkFileReaderApi,
|
||||
checkFormDataApi: checkFormDataApi,
|
||||
checkFormDataInstance: checkFormDataInstance,
|
||||
checkTextEncoderApi: checkTextEncoderApi,
|
||||
logWarnings: logWarnings,
|
||||
};
|
||||
@@ -29,8 +29,8 @@ module.exports = function init(global, console, messages) {
|
||||
}
|
||||
}
|
||||
|
||||
function checkFormDataApi() {
|
||||
if (!global.FormData || !global.FormData.prototype || !global.FormData.prototype.entries) {
|
||||
function checkFormDataInstance(instance) {
|
||||
if (!instance || !instance.entries) {
|
||||
throw new Error(messages.MISSING_FORMDATA_ENTRIES_API);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user