Save files into selected directory (javascript)

后端 未结 1 1150
时光取名叫无心
时光取名叫无心 2020-12-11 21:39


Hello! My question is about javascript.
I want to
1. ask a user to select a directory
2. then write my bunch of files to it (probably with creating s

相关标签:
1条回答
  • 2020-12-11 22:23

    Javascript alone doesn't have any way to access the local computer's file system for WRITE purposes. Period.

    However, Downloadify, by Doug Neiner, was built for this purpose and uses a combination of Javascript and the Flash library.

    It needs Flash 10 to work.

    Alternately, you can install apache onto the computer (or better yet, a full stack like XAMPP or WAMP/MAMP/LAMP) and use PHP (with javascript/ajax) to write files onto the local file system. However, this means that the website must also be hosted locally. Probably your best bet is Downloadify

    Resources:

    https://github.com/dcneiner/Downloadify

    How to create xml file with jquery

    Save content using Jquery? Write to file


    Saving to server-side file using AJAX

    0 讨论(0)
提交回复
热议问题