<HTML> download .sql file

Viewed 929

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

2 Answers
Related