Closed axetroy closed 1 year ago
钉钉小程序
使用框架: React
https://developer.aliyun.com/article/790672
已经确认,需要添加 fileType 字段才不会报错。
但是 Taro.uploadFile 的声明文件里面没有这个字段,自己加上去之后就好了
Taro.uploadFile({ ..., fileType: 'image' })
钉钉文档: https://open.dingtalk.com/document/orgapp/dd-upload-objects
应该能正常上传
上传结果报错 { error: 11, errorMessage: "无效参数" }
Taro CLI 3.6.11 environment info: System: OS: Windows 10 10.0.19045 Binaries: Node: 16.14.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 6.14.18 - C:\Program Files\nodejs\npm.CMD npmPackages: @tarojs/cli: 3.6.11 => 3.6.11 @tarojs/components: 3.6.11 => 3.6.11 @tarojs/helper: 3.6.11 => 3.6.11 @tarojs/plugin-framework-react: 3.6.11 => 3.6.11 @tarojs/plugin-platform-alipay: 3.6.11 => 3.6.11 @tarojs/plugin-platform-h5: 3.6.11 => 3.6.11 @tarojs/plugin-platform-jd: 3.6.11 => 3.6.11 @tarojs/plugin-platform-qq: 3.6.11 => 3.6.11 @tarojs/plugin-platform-swan: 3.6.11 => 3.6.11 @tarojs/plugin-platform-tt: 3.6.11 => 3.6.11 @tarojs/plugin-platform-weapp: 3.6.11 => 3.6.11 @tarojs/react: 3.6.11 => 3.6.11 @tarojs/runtime: 3.6.11 => 3.6.11 @tarojs/shared: 3.6.11 => 3.6.11 @tarojs/taro: 3.6.11 => 3.6.11 @tarojs/taro-h5: 3.6.11 => 3.6.11 @tarojs/taro-loader: 3.6.11 => 3.6.11 @tarojs/webpack5-runner: 3.6.11 => 3.6.11 babel-plugin-transform-taroapi: 3.6.8 => 3.6.8 babel-preset-taro: 3.6.8 => 3.6.8 eslint-config-taro: 3.6.8 => 3.6.8 react: ^18.2.0 => 18.2.0 taro-ui: 3.1.0-beta.7 => 3.1.0-beta.7
https://github.com/NervJS/taro-plugin-platform-alipay-dd/commit/caa22dcf72d217feec19a2d8bebfc95e8803a6b9 需要单独发个版本
@axetroy 0.3.0 版本已发, 去体验下 https://github.com/NervJS/taro-plugin-platform-alipay-dd
0.3.0
相关平台
钉钉小程序
使用框架: React
复现步骤
https://developer.aliyun.com/article/790672
已经确认,需要添加 fileType 字段才不会报错。
但是 Taro.uploadFile 的声明文件里面没有这个字段,自己加上去之后就好了
钉钉文档: https://open.dingtalk.com/document/orgapp/dd-upload-objects
期望结果
应该能正常上传
实际结果
上传结果报错 { error: 11, errorMessage: "无效参数" }
环境信息