tmerclub-doc/基本开发文档/文件上传跨域.md
2025-03-19 15:04:57 +08:00

51 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 1. 说明
+ 文件上传需要配置一下跨域,否则文件上传会因为跨域问题了而上传失败
---
### 2. 跨域配置
#### 2.1 minio
+ minio跨域这边是通过nginx的proxy_pass来解决
+ 具体可看部署文档nginx中minio配置
![](../img/基本开发文档/文件上传跨域/minio跨域.png)
---
#### 2.2 阿里云OSS
+ 官方文档:[链接](https://help.aliyun.com/zh/oss/user-guide/cors-12)
+ 按需修改来源Methods和headers
![](../img/基本开发文档/文件上传跨域/阿里云OSS跨域.png)
---
#### 2.3 腾讯云COS
+ 官方文档:[链接](https://cloud.tencent.com/document/product/436/13318)
+ 按需修改来源Methods和headers
![](../img/基本开发文档/文件上传跨域/腾讯云COS跨域.png)
---
#### 2.4 华为云OBS
+ 官方文档:[链接](https://support.huaweicloud.com/usermanual-obs/zh-cn_topic_0066036542.html)
+ 按需修改来源Methods和headers
![](../img/基本开发文档/文件上传跨域/华为云OBS跨域.png)
---
#### 2.5 七牛云KODO
+ 官方文档:[链接](https://developer.qiniu.com/kodo/8539/set-the-cross-domain-resource-sharing)
+ 按需修改来源Methods和headers
![](../img/基本开发文档/文件上传跨域/七牛云KODO跨域.png)
---