diff --git a/pages/API/download-file/download-file.uvue b/pages/API/download-file/download-file.uvue index 370522685f01a9d2206c37dda1b4024ede66f4ba..82d8c88b6cb1d1b8b51ec12a1430eb00c50152c1 100644 --- a/pages/API/download-file/download-file.uvue +++ b/pages/API/download-file/download-file.uvue @@ -11,6 +11,10 @@ 点击按钮下载服务端示例图片(下载网络文件到本地临时目录) + + + 下载接口的Content-Disposition中的filename非法值例子 + @@ -66,6 +70,17 @@ this.task?.onProgressUpdate((update) => { console.log("progress : ", update.progress); }) + }, + downloadErrorFilename(){ + uni.downloadFile({ + url:"https://qiniu-web-assets.dcloud.net.cn/uni-app-x/static/file/test9.txt", + success: (res) => { + console.log('downloadFile success, res is', res.tempFilePath) + }, + fail: (err) => { + console.log('downloadFile fail, err is:', err) + } + }) }, //自动化测试例专用 jest_downloadFile() {