使用antd的上传组件向oss上传文件的时候提示跨域
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Start by reproducing the antd 3.19.5 upload flow using server-side signing and direct OSS upload. Inspect the upload component's request and preflight behavior against the reported CORS error, then compare it with the working OSS JavaScript SDK flow. Done means the signed upload completes without the browser blocking the preflight request.
Written by the indexing model from the issue text.
Description
使用的antd版本是3.19.5,上传的方法是服务器端签名,js直传
我可以确定的是oss是配置了允许跨域的,小程序可以通过我服务器段生成的签名,policy上传文件
oss提供的jssdk也是可以的,但是用antd的上传组件不行,一直提示跨域
Access to XMLHttpRequest at 'https://xxx.com/' from origin 'https://xxxxxx.com' 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.
具体代码如下
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 323
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-component/upload
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
react-component/upload#170 ·
-
HVAC website Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
react-component/upload#697 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 15/100
react-component/upload#615 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
react-component/upload#522 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-component/upload#515 ·
All issues in react-component/upload
Similar issues
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chrisparsons83/flexspotff#153 ·