Hi Scott,
An invisible iframe is a common technique to do a ajax file upload since you
cant use the browsers XMLHttpRequest.  Possibly he started to implement
something like this and did not complete it.

I have used the Jquery form plugin in the past to do ajax file uploads.  Not
sure if that is your final objective, and I did not read through the entire
post.  But there is a good explanation in in the "File Uploads" example
here:
http://malsup.com/jquery/form/#code-samples

Cheers,
Peter

On Tue, Aug 4, 2009 at 7:09 PM, Scott Olmsted <[email protected]> wrote:

>
> And the answer is:
>
> None of the above.
>
> I first confirmed that the problem was in the upload routine. Other
> redirects worked, both in that controller and others.
>
> Since I had removed virtually all the controller code, and the model
> contained almost nothing, all that was left was the view. And when I
> removed  target="upload_target"  from this line:
>
>   <form action="/my/video/upload" id="uploadByURL" target="upload_target"
> method="POST">
>
> the redirect started working. At
> http://www.w3schools.com/tags/tag_form.asp it says:
>
>    target <http://www.w3schools.com/tags/att_form_target.asp> (_blank
> _self _parent _top *framename* )  Deprecated. Specifies where to open the
> action URL.
>
> More of the view:
>
> <iframe id="upload_target" name="upload_target" src="#"
> style="width:0;height:0;border:0px solid #fff;"></iframe>
>   <div class=...etc>
>     <form action="/my/video/upload" id="uploadByURL" target="upload_target"
> method="POST">
>       ...form inputs...
>
> So I gather that this "invisible" iframe accomodates an uploaded file in
> some way, but I don't understand it. Apparently the code is incomplete, so
> if anyone has any ideas, let me know. Should I scrap the custom code for
> uploading and use Paperclip or another plugin? Remember, this is Rails
> 2.0.2.
>
> Thank you, Matt, Dean, and Kerry, for trying.
>
> Scott
> >
>


-- 
Peter Gumeson
[email protected]

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to