[Vuejs]-Why is the .docx file returned from Controller corrupted?

0👍

I just needed to simplify my approach:

self.$http
.post('/MyController/MyMethod', myData, { responseType: 'blob' })
.then(function (response) {
     var link = document.createElement('a')
     link.href = window.URL.createObjectURL(response.body)
     link.download = 'test.docx'
     link.click()

Leave a comment