huhx / flutter_oss_aliyun

阿里云oss sdk的flutter版本
MIT License
61 stars 23 forks source link

Error: DioException [connection error]: The connection errored: The XMLHttpRequest onError callback was called. This typically indicates an error on the network layer. This indicates an error which most likely cannot be solved by the library. #55

Open Lillls opened 6 months ago

Lillls commented 6 months ago

调用提示DIO错误,请问如何解决

huhx commented 6 months ago

可以提供详细的错误吗?有可以复现的小例子更好

Lillls commented 6 months ago

我用的是 flutter web 好像是跨域的问题
Access to XMLHttpRequest at 'https://xiaoyu-ipic.oss-cn-beijing.aliyuncs.com/text.png' from origin 'http://localhost:57016' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

可以提供详细的错误吗?有可以复现的小例子更好