1

In my web application if user selects files and clicks on a download button, a REST web service call will be made to fetch the files. My requirement is to download the fetched files in user's local drive by popping up a dialogue box. The dialog box should let the user to choose location to save the files chosen.

I already browsed and couldn't get what i need. I've attached my required folder image. enter image description here It would be really helpful if someone helps me on this. Thanks.

Note: Also This links says it's not possible and not correct as well. Kindly let me know if it's true. Set file download destination using ExtJs

Community
  • 1
  • 1
Rajesh
  • 382
  • 3
  • 14

2 Answers2

1

You can't set file download destination in any way with javascript unless its the filesystem API

Endless
  • 34,080
  • 13
  • 108
  • 131
0

A solution is to add a Content-Disposition header to the HTTP response made to the download request. This header should be like:

Content-Disposition: attachment; filename=<file name.ext>

Pascal Le Merrer
  • 5,883
  • 20
  • 35