-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
h5打包后在真机上运行,Taro.uploadFile这个方法根本不触发 #3580
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
刚确认了一下iphone6s机型,然后代码里面我也确认了,在真机上点击图片上传,选完图片后,直接跳过了Taro.uploadFile()这个方法 |
你域名有配置么?upload的安全域名 |
能说具体点吗?我h5在chrome调试的域名和打包后的域名都是一样的。如果安全域名这个没配置的话uploadFile这个方法应该在chrome本地调试就会出错,现在的问题是,在本地chrome调试是OK的,相同的域名,在真机上。uploadFile这个方法不执行 |
没有大佬能回答一下吗? |
CC @Littly |
我目前用原生的input自己实现了上传功能,毕竟taro有他们的优先级。https://github.com/xiafengaha/vux/tree/master/src/components/upload需要的朋友可以参考一下。方法改成react的就可以了。 |
问题描述
[问题描述:目前,在chrome内用浏览器调试h5的uploadFile这个方法,上传请求API什么的都OK。然后打包后,在真机上使用上传功能失效]
复现步骤
[复现问题的步骤]
看下面的截图
期望行为
[上传功能在真机上也能运行]
代码截图
系统信息
** taro依赖信息**
Taro v1.3.4
Taro CLI 1.3.4 environment info:
System:
OS: macOS 10.14.4
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
npm: 6.9.0 - /usr/local/bin/npm
npmPackages:
@tarojs/async-await: 1.3.4 => 1.3.4
@tarojs/cli: 1.3.4 => 1.3.4
@tarojs/components: 1.3.4 => 1.3.4
@tarojs/plugin-babel: 1.3.4 => 1.3.4
@tarojs/plugin-csso: 1.3.4 => 1.3.4
@tarojs/plugin-sass: 1.3.4 => 1.3.4
@tarojs/plugin-uglifyjs: 1.3.4 => 1.3.4
@tarojs/redux: 1.3.4 => 1.3.4
@tarojs/redux-h5: 1.3.4 => 1.3.4
@tarojs/rn-runner: 1.3.4 => 1.3.4
@tarojs/router: 1.3.4 => 1.3.4
@tarojs/taro: 1.3.4 => 1.3.4
@tarojs/taro-alipay: 1.3.4 => 1.3.4
@tarojs/taro-h5: 1.3.4 => 1.3.4
@tarojs/taro-swan: 1.3.4 => 1.3.4
@tarojs/taro-tt: 1.3.4 => 1.3.4
@tarojs/taro-weapp: 1.3.4 => 1.3.4
@tarojs/webpack-runner: 1.3.4 => 1.3.4
eslint-config-taro: 1.3.4 => 1.3.4
eslint-plugin-taro: 1.3.4 => 1.3.4
nerv-devtools: ^1.4.3 => 1.4.3
nervjs: ^1.4.3 => 1.4.3
补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered: