I have an image in Base64 format. I want to send it to the API using formdata. How can that be achieved? I am using React native signature canvas to get the Base64 of the signature.
let signature = base64signature;
const formdata = new FormData();
formdata.append('attachments', {
uri: signature,
name: 'logo',
filename: 'logo',
type: 'image/png',
});
I followed this link as well but don't understand how to send it to the API as formdata. It's constantly giving network errors.
I have also tried to convert it to a blob and send but that didn't work either. Can anyone help me with this?
Fileobject. Please also include the error message(s) in your questionformDataisn't any of the acceptable parameter types. It must be be "aUSVStringorBlob(including subclasses such asFile)"