0

Window.document.execCommand('SaveAs', true, 'new.txt'); i don't want to use this because it pops-up windows explorer. i want to directly save it to current working directory.

Kittu
  • 43
  • 1
  • 9
  • Saving to a directory on the hard drive is a security risk. Hence the popup box. –  Dec 12 '18 at 06:38
  • so, there's no way to work in this manner? – Kittu Dec 12 '18 at 08:49
  • @Kittu Yes, it's a security policy. Imagine a user who opens the site and without his knowledge some files are saved on his computer. – Margulan Zharkenov Dec 12 '18 at 12:47
  • Does this answer your question? [How to create a file in memory for user to download, but not through server?](https://stackoverflow.com/questions/3665115/how-to-create-a-file-in-memory-for-user-to-download-but-not-through-server) – Cees Timmerman Apr 04 '23 at 18:07

0 Answers0