Skip to content
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

[FR]: Uploader组件小程序端无beforeUpload props参数和此功能 #1490

Closed
codedart2018 opened this issue Sep 21, 2023 · 3 comments
Closed

Comments

@codedart2018
Copy link

这个功能解决了什么问题?

看了下代码 uploader.taor.tsx里无beforeUpload, uploader.tsx里有。需要小程序端也补齐此参数。
image
遇到上传第三方文件,我需要前置处理文件大小,及往fromData里动态补数据。

你期望的组件设计是怎样的?

目前是不支持此参数的,希望补齐此参数

@codedart2018 codedart2018 changed the title [FR]: Uploader组件小程序端无beforeUpload props参数 [FR]: Uploader组件小程序端无beforeUpload props参数和此功能 Sep 21, 2023
@oasis-cloud
Copy link
Collaborator

小程序下采用 taro 的 chooseMedia 或 chooseImage 实现上传选择文件的功能,目前不能对这两个方法拦截

@codedart2018
Copy link
Author

chooseImage

那希望做一个在发起choose的时候回调一个方法,获取数据能让和data 或headers合并
现在像第三方oss上传的时候,一般都是客户端直专,所以文件路径名就得前端命名好。对于传到Data 或 header里的数据就没法改变了,上传一次还好。再上传二次可能就会出现问题!

@zhangminggeek
Copy link
Contributor

并且上传前需要获取OSS签名,没有这个钩子的话应该在哪里执行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants