使用的是angular-file-uploadangular頁面將圖片上傳到圖片服務器,出現了跨域問題XMLHttpRequest cannot load http://upload.1-1dr.com/fileupload. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://dev.1-1dr.com' is therefore not allowed access.按照CORS的解決方法,服務器端響應添加了Access-Control-Allow-Origin頭,但問題還是沒解決。想問,是不是angular在上傳文件的請求中,也需要帶一些參數,才能解決跨域問題?
Angular 文件上傳跨域問題?
翻閱古今
2018-10-10 13:15:23