silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
391 stars 313 forks source link

uploadFIle doesn't send parameters #521

Open max763 opened 5 months ago

max763 commented 5 months ago

Hi silkimen, when uploading a file the parameters as described (e.g.: {id:'12',message:'test'}) are not transferred as part of the multipart request. In public-interface.js params: params are not handed over to > exec(onSuccess, onFail, 'CordovaHttpPlugin', 'uploadFiles', [url, but no params]

Would it be possible to hand it over to public CordovaHttpUpload() and send it out together with the files? Best regards Max

cordova.plugin.http.uploadFile("https://google.com/", { id: '12', message: 'test' }, { Authorization: 'OAuth2: token' }, filePath, name, function(response) { console.log(response.status); }, function(response) { console.error(response.error); });