I have a situation where I'm having to take binary data (for PDFs, word docs, etc) via ajax and allow users to download the file by clicking on a link.
Currently I am doing this by opening a new browser window with the binary data.
window.open("data:application/pdf;base64,"+ binaryFileData);
This works for opening the file, but the file name generated is always the actual binary string and not anything human-readable.
Is there a way to give the opened file a specific name?