PHP ajax force_download only shows in browser
2021. 1. 13. 14:17ㆍJavaScript/JQuery
728x90
stackoverflow.com/questions/39099904/force-download-in-ajax-and-php
Through AJAX you can't download file directly, You will need to open that path in new tab to download it.
Like this,
window.open('http://YOUR\_HOST/develop\_tsurumaru/assets/uploads/LJTD2508.xlsx', '\_blank');
Update the URL to access the file from web instead of file system.
728x90
반응형
'JavaScript > JQuery' 카테고리의 다른 글
jquery datatable excel export colspan, rowspan, multiple headers (0) | 2021.03.31 |
---|---|
jquery append, after 차이 (0) | 2020.08.31 |
event binding on dynamically created elements (0) | 2020.08.12 |
JQuery event.preventDefault() 용도 (0) | 2020.08.12 |
jquery remove duplicate elements (0) | 2020.08.11 |