通過Swagger接口導(dǎo)出模板文件時報錯:URL.createObjectURL: Argument 1 is not valid for any of the 1-argument overloads.
問題描述:通過Swagger接口導(dǎo)出Excel模板文件時,報錯:URL.createObjectURL: Argument 1 is not valid for any of the 1-argument overloads.
問題現(xiàn)象:

解決方案:
1、打開瀏覽器調(diào)試窗口,將請求復(fù)制為cURL命令
火狐瀏覽器:

谷歌瀏覽器:

2、將cURL命令粘貼到命令行窗口中,在命令最后加上“ -o test.xlsx ”,將文件下載到當(dāng)前目錄。( test.xlsx 為自定義的文件名稱 )

3、查看下載成功的文件


浙公網(wǎng)安備 33010602011771號