New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload 分片上传 #25929
Comments
You can try |
Hello @zerox-v. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. Appreciate it advance and we are looking forward to your contribution! 你好 @zerox-v, 我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献! |
这个上传写到customRequest就完事了吧, 或者关闭customRequest customRequest=() => {
// 禁用自动上传
} <Dragger
fileList={fileList}
onChange={this.onUpload}
onRemove={this.onRemoveFile}
multiple
customRequest={this.customRequest}
iconRender={this.renderLinkIcon}
>
<p className="ant-upload-drag-icon">
<InboxOutlined />
</p>
<p className="ant-upload-text">单击或拖动文件到该区域上传</p>
<p className="ant-upload-hint">
支持单一或批量上传。
</p>
</Dragger> 然后从state里获取本地的上传数据, 自己分片上传。 |
has someone implemented it in the meantime and could share an example, please? |
这块有没有分片上传的demo |
得,沉了的需求。然而这个现在很影响体验。 |
upload这个组件还有许多改进的空间 |
分片上传怎么做?有没有demo? |
可以看看 #41484 PR(demo 太长了, 未被 merge |
What problem does this feature solve?
请问Upload 有计划支持分片上传吗?现在上传文件要是太大了的话会超时,导致文件上传失败。
What does the proposed API look like?
添加如下属性
chunked {boolean} [可选] [默认值:false] 是否要分片处理大文件上传。
chunkSize {number} [可选] [默认值:5242880] 如果要分片,分多大一片? 默认大小为5M.
chunkRetry {number} [可选] [默认值:2] 如果某个分片由于网络问题出错,自动重传次数
threads {number} [可选] [默认值:3] 上传并发数。允许同时最大上传进程数。
使用方式
The text was updated successfully, but these errors were encountered: