Submitting a form with an aviary edited image
===

I'm trying to use aviary to edit photo's in my ruby on rails app. I have a form where user's can edit their profile, on this they have the option to keep their current image, edit it with aviary or upload a new one. Aviary provides a temporary link to the new edited image, I want this edited image to not be sent to the server until the whole form is submitted. How should i go about doing this?

I had hoped to pass the url into the input file path but from looking taking a look at what firefox sens back it says it is an unsafe operation. Also does the filepath for the input file have to be a local one?

in html in my form:

          <div id="testInput" >  </div>

in aviary's onSave

            $('<input type="file" id="photo_1" name="photo_1">').appendTo('#testInput');
           var imgFile = document.getElementById("photo_1");
            imgFile.value = newURL;

