Forums › Forums › Web Design › Having an issue with angular 7 file upload with node express backend and multer.
-
Having an issue with angular 7 file upload with node express backend and multer.
-
Can anyone help I’m trying to upload an image from angular 7 front end to node express backend. I’m appending the file to FormData then doing a http post request and attaching the form data. However, I’m getting these errors. POST http://localhost:3000/imageupload 400 (bad request) Access to XMLHttpRequest at http://localhost:3000/imageupload from origin http://localhost:4200 has been blocked by CORS policy: No ‘Access-control-allow-origin’ header is present on the requested. The image upload works through postman but not from angular front end I have cors on the backend App.use(cors()) – by /hq/Rickygoacher – –
Viewing 1 of 1 replies