0

I've been trying to get Ajax to download a file being saved on the server using the answer used here.

The only difference is that my application is a single page app.

The problem that I'm having is when we call the method to download the file. The method used above just calls the link to where the file is saved, but in my application, there are no links.

How would I achieve/convert the answer I'm using to work with a single page application?

I've tried window.open(url) instead of window.location = url

but that would just get me a 404 error.

Community
  • 1
  • 1
  • window.open method should work. when you get the url, have you tried pasting that url into your browser and see if that works? i doubt it does. – Ji_in_coding Aug 12 '16 at 17:14
  • Yeah, I tried that. Just gives me a 404 error –  Aug 12 '16 at 17:31
  • your front end code should be fine, you are experiencing a backend issues. possibly wrong route. sort that out and you should be fine. – Ji_in_coding Aug 15 '16 at 01:22

0 Answers0