Possible Duplicate:
Is there any way to specify a suggested filename when using data: URI?
so I've managed to get an XML file from a powerpoint, ajax that XML and then prompt the user to download the file with base 64 encoding. Once the user downloads the file he/she can open it with powerpoint and all works perfect. My only problem is the name of the file to download and the extension. Currently in chrome it prompts to download a file named "download" with no file extension. Any ideas on how to edit both the name of the file to download and the extension as well?
Here is a snippet of the code:
var file;
$.ajax({
type: "GET",
url: "file.xml",
dataType: "xml",
success: function(xml) {
file = xml;
}
});
window.location = "data:ms-powerpoint;base64" + btoa(file);
Thanks!