I need to pass an sap.m.Image
file to the body(Data) of an OData request. Below is the code and I would like to know what to pass to the data
parameter of the request so that my Image gets uploaded to the backend. When I pass the ImgValue
which contains the dataurl it gives out an error saying
DOMException: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('d:0') contains the invalid name-start character
OData.request({
requestUri: "http://ambrifiori.am.brothergroup.net:8081/sap/opu/odata/sap/ZPVSYSTEM_SRV/PromoImagesSet/",
method: "POST",
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/atom+xml",
"DataServiceVersion": "2.0",
/*"Accept": "application/atom+xml,application/atomsvc+xml,application/xml", */
"X-CSRF-Token": header_xcsrf_token,
"slug": "ajay122",
},
data: ImgValue,
});