diff --git a/cordova/cordova-tests.ts b/cordova/cordova-tests.ts index d0e6e6889..7e97305a2 100644 --- a/cordova/cordova-tests.ts +++ b/cordova/cordova-tests.ts @@ -192,7 +192,7 @@ file.upload('cdvfile://localhost/persistent/path/to/downloads/', console.error('Failed with exception ' + err.exception); } }, - { headers: null, httpMethod: "PUT" }, + { headers: {"X-Email": "user@mail.com", 'X-Token': "asdf3w234"}, httpMethod: "PUT" }, true); file.abort(); diff --git a/cordova/plugins/FileTransfer.d.ts b/cordova/plugins/FileTransfer.d.ts index 140973cd5..40829668a 100644 --- a/cordova/plugins/FileTransfer.d.ts +++ b/cordova/plugins/FileTransfer.d.ts @@ -93,7 +93,7 @@ interface FileUploadOptions { /** Whether to upload the data in chunked streaming mode. Defaults to true. */ chunkedMode?: boolean; /** A map of header name/header values. Use an array to specify more than one value. */ - headers?: Object[]; + headers?: Object; } /** Optional parameters for download method. */