I\'m trying to implement a Service that automatically starts a download with the requested file.
This is my AJAX call:
function downloadFile(fileName
Don't use ajax, just set window.location.href to the url of the file and set the http content disposition header in your server script to force the browser to save the file.
function downloadFile(fileName) { window.location.href = SERVICE_URI + "files/" + fileName; }