Uploading file failed: Missing initial multi part boundary when oploading image on hybrid iOS

0
I run into an weird problem when taking a picture on a hybrid app on iOS. To do this is downloaded this marketplace module and extracted the TakePicture javascipt action. The function that actually saves the image looks like this: function saveDocument(imageObject, uri, blob) { return new Promise((resolve, reject) => { const guid = imageObject.getGuid(); const filename = /[^/]*$/.exec(uri)[0]; const onSuccess = () => resolve(true); const onError = error => reject(error.message); mx.data.saveDocument(guid, filename, {}, blob, onSuccess, onError); }); }   The widget works fine untill I want to save the picture I just took. This causes an arror and this line show up in the log:   java.io.IOException: Missing initial multi part boundary   This only happens on iOS devices. Android works fine.   Runtime version: 9.24.15 hybrid-app-template: 8.0.0 cordova: 12.0.0   After some googling I found out that the cause might be a wrong content-type header being set when posting the image. I guess this happens at mx.data.saveDocument. Am I looking in the right direction? If so, what can I do about this?   Regards, Reinier
asked
0 answers