How to keep filename when download: open enabled
How to keep filename when download: open enabled
nasimul007
Posts: 3Questions: 1Answers: 0
I added my code snippet here. when "download: 'open'" is enabled and i try to download the pdf, browser auto generates the filename, but i want to keep my custom filename. If "download: 'open'" is disabled "filename" works perfectly.
Thank you
{
extend: 'pdf',
download: 'open',
filename: 'custom filename'
}
This discussion has been closed.
Answers
Try using
title
, as in this example - that should do the trick,Colin
title
doesn't work whendownload: 'open'
is enabled. Browser provides automated filename.Try
filename
- this example here is keeping the name in that dialogue (see Excel - it's putting a time stamp on the file),Colin
perfectly works for
excel
andcsv
but not forpdf
. here, i attached the code used forpdf
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin