Skip to content

Commit e1a93aa

Browse files
committed
formData.getHeaders is missing in the browser
1 parent bc7a2a3 commit e1a93aa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/woqlClient.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,12 @@ WOQLClient.prototype.query = function (woql, commitMsg, allWitnesses, lastDataVe
674674
resourceObject.source.post = fileName;
675675
});
676676

677-
formData.append("payload", new Blob([JSON.stringify(doql)], { type: "application/json" }), "body.json");
678-
this.customHeaders(formData.getHeaders());
677+
formData.append('payload', new Blob([JSON.stringify(doql)], { type: 'application/json' }), 'body.json');
678+
if(formData.getHeaders) {
679+
this.customHeaders(formData.getHeaders());
680+
} else {
681+
this.customHeaders({ "Content-Type": "multipart/form-data" });
682+
}
679683

680684
postBody = formData;
681685
} else {

0 commit comments

Comments
 (0)