0

What I am trying to do is this .. I have an image in the HTML page and using a button I want this save button and you can choose where to save the paste, like a "save image as".

Also still intend to create a simple input will appear where the path of where the image was saved, so that path is saved in the database.

Is this possible? Any help is welcome

Perco
  • 160
  • 1
  • 18
  • 2
    you can use some third party libraries to allow you to `save as` the file but you won't be able to get the location where it was saved. – TheBrain Apr 11 '13 at 13:44
  • I can't see how you could save through javascript. Unless you make a plugin for greesemonkey for an addin for the browser. – Menelaos Apr 11 '13 at 13:45
  • What could you possibly want this information for? The user can easily move the file once done, and then your database would be wrong – musefan Apr 11 '13 at 13:46
  • which the User makes the image does not matter! but then someone would have at least an example of how to save in a given directory? – Perco Apr 11 '13 at 13:50
  • you just can't point to a directory in the save dialog. that is for the OS to handle and remember last saved paths and other preferences. as for how to save from javascript there are A LOT of examples on SO with all possible methods. from HTML5 specific and/or flash to custom activex controls. – TheBrain Apr 11 '13 at 14:05

1 Answers1

0

It is probably impossible, due to security reason. Many of client/local functions for javascript are disabled. LIke reading and writing to local file system. If you want to do such stuff, you need to do it in server languages, like php ( recommended )

Fabiotocchi
  • 226
  • 3
  • 11