i need to upload my react-native-signaturepad output as image in to a server.i have tried this following code
//this.state.base64 is signaturepad output
let blob = new Blob([this.state.base64], {type: 'image/png'});
alert(blob.size);
var fd = new FormData()
fd.append('file',blob,"Sign.png")
let url="http://xxxxxx/xxxx/xxx/";
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'multipart/form-data'
},
body: fd
}).then(function (response) {
alert("dfdfdfdfd")
});
using this above code i am getting
"multipart body must have at least one part "
error please any one help me solve this issue
Thanks