Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82388

Download Database File (MVC App)

$
0
0

Hello

I'm new to DataTables + Jquery so apologies in advance...

I have a database that contains a stored file in one of the columns (D:\home\site\wwwroot\App_Data\report4324.pdf). I would like to 'mask' the file location with a 'download' URL and when the 'download' URL is clicked the associated file is downloaded.

The file can be named anything but will always be either a doc, docx or pdf.

This doesn't seem to work since the URL is incorrect:

{
"data": "PO",
"render": function (data, type, full, meta) {
return '<a href="' + data + '">Download</a>';
}

Any advice / help will be highly appreciated - thank you!


Viewing all articles
Browse latest Browse all 82388

Trending Articles