I get the path of the file using Axios.get :
C:\Users\me\AppData\Local\Temp\lorem.csv
Axios syntax get
{
// axios post generate
const URL = '/api/report'+ '/generate'
axios.post(URL, {
report: this.editedItem.report,
values: this.editedItem.values
})
.then(response => {
this.fetchItem()
const URL = '/api/report/path'
axios.get(URL)
.then(response => {
this.path = response.data
})
.catch(err => {
alert(err)
})
})
.catch(err => {
//what happen after error
alert(err)
})
this.close()
}
And I send that path to the a tag
<a :href="path" download target="_blank" class="tabs__item tabs__item--active" style="position: relative;"><u>{{ path }}</u></a>
but, console says : Not allowed to load local resource: [path]
I've tried [doesn't work]: - node: __dirname: false, __filename: false - blob type data - other browser, still same
The file is dynamic, server produce the file and save the file in the directory.