前端下載文件(接收文件流)(POST)

ajax接收文件流 設置接收參數格式爲responseType: ‘blob’, 2.接收文件流並建立地址(若爲圖片可把地址賦值給img標籤) 3.下載 本例爲vue全家桶中的下載爲例** download (name, fileUrl) { this.$axios({ url: ‘url’, method: ‘POST’, responseType: ‘blob’, //params傳值能夠像g
相關文章
相關標籤/搜索