Answer the question
In order to leave comments, you need to log in
How to trigger file upload in Vue.JS?
Porting a template from blade Laravel to Vue.
There is a link in the template that should download the file:
<button @click="DownloadFile(id, 1)" class="btn btn-light btn-sm" >Скачать</button>
DownloadFile(id, type) {
fetch(`/test/${id}/${type}/download`, {
method: 'get'
})
},
Answer the question
In order to leave comments, you need to log in
That's what I do.
dachserLabelDownload() {
window.open('{!! route('reports.dachserLabelPdf', ['renderType' => App\Components\Documents\Pdf\PdfDocumentAbstract::RENDER_TYPE_DOWNLOAD]) !!}' + '?date=' + this.dachserCsvReport.date)
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question