Upload pictures to cloud storage.
uni.chooseImage({ count:1, success:res=>{ this.src=res.tempFilePaths[0] console.log(res.tempFilePaths[0]) uniCloud.uploadFile({ filePath:res.tempFilePaths[0], cloudPath:res.tempFilePaths[0]+res.tempFiles[0].name, success: (res) => { console.log(res) }, fail: (err) => { console.log(JSON.stringify(err)) } }) } })
Error reported: {errmsg “:” cloudpath is illegal “}
Reason: cloudpath
– when using alicloud, cloudpath is the cloud file name. Do not use the illegal character
(cloudpath: res.tempfilepaths [0] + res.tempfiles [0]. Name -- & gt; is illegal)
Solution: change to cloudpath: res.tempfiles [0]. Name
Similar Posts:
- Python JSON error json.decoder.jsondecodeerror Chinese
- [Solved] Jquery ajax “Uncaught TypeError: Illegal invocation”
- Two solutions to cross origin read blocking (CORB) blocked cross origin response error of Web Service API
- How to Solve Error: Unexpected token o in JSON at position 1
- docker: Get https://registry-1.docker.io/v2/: x509: certificate is valid for *.xenahubs.net, not …
- Python: json:json.decoder.JSONDecodeError: Invalid control character at: line 2 column 18 (char 19)
- [Solved] Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
- [Solved] JS Ajax uploads an error “uncaught type error: illegal invocation”
- [Solved] Error-Javascript: Uncaught Error: Malformed UTF-8 data at Object.stringify (crypto-js.js:478) at W…