### 操作使用示例
1. 在vue中操作 上傳文件
```
upload(req) {
const that = this;
const file =req.file;
if (file) {
let formData = new FormData();
formData.append("file", file.raw);
formData.append("name", file.name);
that.$txSDK.uploadFile({ filePath: formData }, "post").then(res => {
console.log(res)
? ? ? ? });
? ? ?}
?},
```
*****
2. 在小程序操作 上傳文件
```
upload(){
wx.chooseImage({
??????count:1,
??????sizeType:?['original','compressed'],
??????sourceType:?['album','camera'],
success:function(res){
let tempFilePaths=res.tempFilePaths;
wx.isSDK.uploadFile({filePath:tempFilePaths[0]}).then(res=>{
console.log(res)
})
}
})
}
```
*****
### 數據返回結果示例
```
{
code:200,
msg:"成功",
data:[
{"url:"https://6761-game-6gaawxc14e1c3be1-1258432851.tcb.qcloud.la/uploadFile/files/weasfsfawea/tmp/s0p6qkQs6l7dA66x9HDBQKey.png""}
]
}
```
*****