Hello,
First, what I am trying to do is:
I am trying to create a browser application that works on clientside. The basic idea is the user uploads a xml file into javascript. Javascript does calculations on this data and displays results onto the browser. The user is able to interactively edit the result (something like an image/video) and change whatever they need and save the edited results onto their local drive.
I have everything working except the saving to local drive step since Javascript alone does not have access the the user's local drive. To get around this I can only think of a really inefficient implementation (I'm not much of an expert):
The user uploads xml file to Rails server (size 1~2mb). Rails server parses xml and sends back data to client side javascript/ajax (1~2mb). User can then edit data. When done, user stores data in hidden form and submits to Rails server. Rails server generates a new xml file from this data and sends back this file to the user to download and save locally.
If the file were stored on the server from the start, the first steps can be simplified, but after edits on client side it seems like I still have to send back all data to the server which then sends back the generated xml file.
I guess there is no way for the server to allow Javascript variables to be saved directly? Or does anybody have any better suggestions I can do?
Just to clarify why I am doing some of the rare/bizarre things I do:
The editing application works on web browsers so anybody can access it without downloading any special software. Another goal behind this is to be able to use the application on smartphones by simply going to a web browser. I don't use applets/flash/silverlite/etc because most smartphones don't allow them.
For editing interactivity, I work with all data on clientside javascript. I am assuming if I just upload data to the server and send edit commands to the server and edit on server side, it would greatly slow the interactiveness. Also, the user doesn't require an internet connection to do most of the editing.
Thanks, Mark