We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
浏览器版本: Chrome 90 使用框架: React
const uploadTask = Taro.uploadFile({ url: `/openapi/${query}`, filePath: files[0], name: 'file', formData: { user: 'test', }, header: { token: '123', abc: 'abc' }, success: function(res) { var data = res.data //do something return data }, }) uploadTask.progress(res => { console.log('上传进度', res.progress) console.log('已经上传的数据长度', res.totalBytesSent) console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend) }) uploadTask.abort() // 取消上传任务
headers 显示 token
Accept: */* Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6,ko;q=0.5,ja;q=0.4 Cache-Control: no-cache Connection: keep-alive Content-Length: 1354 Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypnWFAxyBMAiBz5zp DNT: 1 Host: 10.0.2.135:10086 Origin: http://10.0.2.135:10086 Pragma: no-cache Referer: http://10.0.2.135:10086/ User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1
👽 Taro v3.1.4 Taro CLI 3.1.4 environment info: System: OS: macOS 11.3 Shell: 5.8 - /bin/zsh Binaries: Node: 12.16.3 - ~/.nvm/versions/node/v12.16.3/bin/node Yarn: 1.22.4 - ~/.nvm/versions/node/v12.16.3/bin/yarn npm: 7.6.3 - ~/.nvm/versions/node/v12.16.3/bin/npm npmPackages: @tarojs/cli: 3.1.4 => 3.1.4 @tarojs/components: 3.1.4 => 3.1.4 @tarojs/mini-runner: 3.1.4 => 3.1.4 @tarojs/react: 3.1.4 => 3.1.4 @tarojs/runtime: 3.1.4 => 3.1.4 @tarojs/taro: 3.1.4 => 3.1.4 @tarojs/webpack-runner: 3.1.4 => 3.1.4 babel-preset-taro: 3.1.4 => 3.1.4 eslint-config-taro: 3.1.4 => 3.1.4 react: ^17.0.0 => 17.0.2 taro-ui: ^3.0.0-alpha.10 => 3.0.0-alpha.10
The text was updated successfully, but these errors were encountered:
No branches or pull requests
相关平台
H5
浏览器版本: Chrome 90
使用框架: React
复现步骤
期望结果
headers 显示 token
实际结果
环境信息
The text was updated successfully, but these errors were encountered: