# uploadFileByPut ^11.2

put方式上传文件

# 请求参数

Prop Type Value Comment
uploadUrl String - 服务器地址
headers Object - HTTP 请求的 Header
filePath Number - 要上传的文件路径

# 接口调用示例


      let params = {
        uploadUrl: '', 
        headers: {}, 
        filePath: ''
      }

      this.$bridge
        .uploadFileByPut(params)
        .then(res => {    
          this.$alert(res)
        })
        .catch(err => {
          this.$toast(err)
        })

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# 返回参数

  • 成功时返回
Prop Type Comment
code 返回码0:成功,-1000:失败 -
msg 返回信息 -
status Number 上传状态。1:上传成功,-1:上传失败
Last Updated: 12/19/2025, 10:27:53 AM