Skip to content

Instantly share code, notes, and snippets.

View huynq0410's full-sized avatar
🌴
On vacation

Nguyễn Quang Huy huynq0410

🌴
On vacation
View GitHub Profile
@odan
odan / xampp_php7_xdebug.md
Last active July 25, 2024 23:01
Installing Xdebug for XAMPP
@javilobo8
javilobo8 / download-file.js
Last active July 27, 2024 07:41
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);