ng2-file-upload
ng2-file-upload copied to clipboard
Change Method
this uploader = new FileUploader({ url: URL, method: "POST", headers: [ { name: "Content-Type", value: "multipart/form-data" }, { name: "Authorization", value: "Bearer " + user.accessToken } ] });
After doing this it doesn't change the Method it just sends as "OPTIONS" and I need "POST"
Hi! I'm having the same issue, were you able to figure it out?
Yup, at the end it was a CORS problem. It sends an OPTIONS but after that it sends the POST. so if you haven't set CORS headers on your server it will fail right after the OPTIONS call.
Thanks! I'm kind of new to this and I'm not familiar with CORS, can you share your solution? I have a Spring boot back-end application
Running into the same issue. POST becomes a GET. No CORS for me