Hi, I am using ruby with postgresql, I want to know how to upload images to path and then store the path in the database.i would not like to store the images in database . i also want to know how to display the uploaded images. -koli -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, Well you can create a multi-part form with a file input, submit the form.. get the image data from the uploaded image and store it in a binary field. For showing it again, um, perhaps a controller action to show images which uses send_data. A much nicer way would not to store images in the database, such as looking at the file_column or attachment_fu plugins. Cheers, James On Dec 6, 2007 5:05 PM, Koli Koli <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > I am using ruby with postgresql, > I want to know how to upload images to path and > then store the path in the database.i would not like to store the images > in > database . > i also want to know how to display the uploaded images. > > -koli > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
James Brooks wrote:> Hi, > > Well you can create a multi-part form with a file input, submit the > form.. > get the image data from the uploaded image and store it in a binary > field. > For showing it again, um, perhaps a controller action to show images > which > uses send_data. A much nicer way would not to store images in the > database, > such as looking at the file_column or attachment_fu plugins. > > Cheers, > JamesThanks for the reply.downloaded file_column and got it working. the other thing what i want it add comments along with the images. i want the comments also to be shown with the images .how do i do it?? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 for the reply.downloaded file_column and got it working. > the other thing what i want it add comments along with the images. > i want the comments also to be shown with the images .how do i do it??simply add a textfield to the form and store the content in the db, together with the path -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thorsten Mueller wrote:>> >> Thanks for the reply.downloaded file_column and got it working. >> the other thing what i want it add comments along with the images. >> i want the comments also to be shown with the images .how do i do it?? > > simply add a textfield to the form and store the content in the db, > together with the paThanks for the reply.one more thing i wanted to know was how to display images as thumnails as soon as uploaded. An example would be helpful. -Koli -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I suggest you look at the attachment_fu plugin. On Dec 6, 3:51 am, Koli Koli <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Thorsten Mueller wrote: > > >> Thanks for the reply.downloaded file_column and got it working. > >> the other thing what i want it add comments along with the images. > >> i want the comments also to be shown with the images .how do i do it?? > > > simply add a textfield to the form and store the content in the db, > > together with the pa > > Thanks for the reply.one more thing i wanted to know was how to display > images > as thumnails as soon as uploaded. > An example would be helpful. > > -Koli > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---