I'm working on a Angular App
I've this function
`
vm.DownloadFile = function (item) {
var a = document.createElement('A');
a.href = item.fileSourceUrl;
a.download = item.fileSourceUrl.substr(item.fileSourceUrl.lastIndexOf('/') + 1);
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
`
This allows me to download files from my view using an url . It works fine, i can download my files with that.
The problem I just noticed is that i can't download .sql files . Why ?
Many types of file are working , .jpg
, .pdf
, .dwf
... everything but .sql
I finally found what was wrong , MIME type for .sql was not set in my IIS configuration.
You need to set MIME type for .sql files
To set MIME type
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With