File upload to AEM (local SDK and AEM cloud) via third party react app
Has anyone tried uploading a file from browser to AEM local sdk as well as AEM cloud via React application (node backend)? How do you get rid of the CORS error in the client?
I tried below in react and it gives me CORS error even if I set the CORS policy config alloworgins to *
const res = await fetch(apiEndpoint, {
headers: {
// Authorization: `Bearer ${token}`,
Authorization: `Basic ${Buffer.from(`admin:admin`, 'binary').toString(
'base64',
)}`,
},
});
I also get connection refused when I move this code to node backend. Please suggest.
