hi everyone- If I add a file_field to a form, and on create, the model fails to save for some error, I then redirect back to edit, every other field shows up on the form, except file_field''s. This becomes tedious to a user, because any time there''s an error, they have to relocate the file from the browse button. This seems like it''s built into file_field, but someone must have a workaround? Thanks for any info. Dino --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That''s a security issue of which you will find no solution. A few browsers (Opera, etc) may allow you to pre-fill a file input, but they usually pop up a confirmation for the user to click through anyway, which is just as annoying. My advise to you is to give up on trying to make that work. It''s just not going to happen. http://www.w3.org/TR/html401/interact/forms.html On Wed, May 7, 2008 at 11:21 AM, dino d. <dinodorroco-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > hi everyone- > > If I add a file_field to a form, and on create, the model fails to > save for some error, I then redirect back to edit, every other field > shows up on the form, except file_field''s. This becomes tedious to a > user, because any time there''s an error, they have to relocate the > file from the browse button. This seems like it''s built into > file_field, but someone must have a workaround? Thanks for any info. > > Dino > > >-- James Mitchell --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks James, I''ll take your advice. Dino On May 7, 4:43 pm, "James Mitchell" <jmitc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> That''s a security issue of which you will find no solution. A few browsers > (Opera, etc) may allow you to pre-fill a file input, but they usually pop up > a confirmation for the user to click through anyway, which is just as > annoying. > > My advise to you is to give up on trying to make that work. It''s just not > going to happen. > > http://www.w3.org/TR/html401/interact/forms.html > > On Wed, May 7, 2008 at 11:21 AM, dino d. <dinodorr...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote: > > > hi everyone- > > > If I add a file_field to a form, and on create, the model fails to > > save for some error, I then redirect back to edit, every other field > > shows up on the form, except file_field''s. This becomes tedious to a > > user, because any time there''s an error, they have to relocate the > > file from the browse button. This seems like it''s built into > > file_field, but someone must have a workaround? Thanks for any info. > > > Dino > > -- > James Mitchell--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---