Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replace file when downloading

Referring to this example: http://jsfiddle.net/m9nts8r1/

How can I update the content of updatedText.xml when pressing the 'Download' button, just as it does when the 'Save' button in any application?

In this case I just get another updatedText (1).xml, updatedText (2).xml and so on.

Moreover it would be nice if it was possible to specify the directory where the updatedText.xml is saved.

Has someone an idea?

like image 430
wurstbrotrest Avatar asked Oct 28 '25 12:10

wurstbrotrest


1 Answers

You cannot do this. Once the file is downloaded it is on your hard drive. Your web browser does not have the permission to access your file system (just imagine what a mess it would be if a website could look into your files or even change them). I guess you will unfortunately have to live with the newly created files or solve your problem with another technology.

like image 73
k-nut Avatar answered Oct 31 '25 01:10

k-nut