Hi all, I have taken a picture(BLOB) in the DB (sqite3), I have a problem to display picture on the screen. Can anyone help me and give me some advices please... Thank you so much -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12/06/2011, joanne <joanne0558-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have taken a picture(BLOB) in the DB (sqite3), > I have a problem to display picture on the screen. > Can anyone help me and give me some advices pleaseAmritpal? Is that you? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jun 11, 2011 at 6:02 PM, joanne <joanne0558-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have taken a picture(BLOB) in the DB (sqite3), > I have a problem to display picture on the screen. > Can anyone help me and give me some advices please...Sure. My advice is: don''t do that. Store static images in the file system and serve them the normal way. HTH! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
no no no lol On Sat, Jun 11, 2011 at 10:05 PM, Michael Pavling <pavling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 12/06/2011, joanne <joanne0558-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have taken a picture(BLOB) in the DB (sqite3), > > I have a problem to display picture on the screen. > > Can anyone help me and give me some advices please > > Amritpal? Is that you? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- -------------------------------- Thank you, Yen -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi,, do you have any other options for me.. cuz i really have to do in this way Thanks On Sat, Jun 11, 2011 at 10:07 PM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jun 11, 2011 at 6:02 PM, joanne <joanne0558-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I have taken a picture(BLOB) in the DB (sqite3), > > I have a problem to display picture on the screen. > > Can anyone help me and give me some advices please... > > Sure. My advice is: don''t do that. > > Store static images in the file system and serve them the normal way. > > HTH! > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > http://about.me/hassanschroeder > twitter: @hassan > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jun 11, 2011 at 7:17 PM, joanne ta <joanne0558-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi,, do you have any other options for me.. cuz i really have to do in thisThen write a controller to fetch the image data from the DB and deliver it with the appropriate content-type. Put the URL of that controller/image in your HTML as the image source attribute. That''s it. Best of luck! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
thanks i found the way to display the picture on the screen by using sent_data method to convert link On Jun 11, 10:45 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jun 11, 2011 at 7:17 PM, joanne ta <joanne0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi,, do you have any other options for me.. cuz i really have to do in this > > Then write a controller to fetch the image data from the DB and deliver > it with the appropriate content-type. > > Put the URL of that controller/image in your HTML as the image source > attribute. > > That''s it. Best of luck! > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder > twitter: @hassan-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Instead of trying to re-invent the wheel, or a picture of that wheel, take a look at Paperclip or Carrierwave. Both are plugins that make storing and displaying pictures simple. I would recommend as well to use a file system storage solution depending on the scale of the project On Jun 12, 10:51 am, joanne <joanne0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> thanks i found the way to display the picture on the screen by using > sent_data method to convert link > > On Jun 11, 10:45 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > > > > > On Sat, Jun 11, 2011 at 7:17 PM, joanne ta <joanne0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi,, do you have any other options for me.. cuz i really have to do in this > > > Then write a controller to fetch the image data from the DB and deliver > > it with the appropriate content-type. > > > Put the URL of that controller/image in your HTML as the image source > > attribute. > > > That''s it. Best of luck! > > > -- > > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe9ZOsn5GM1qlQ@public.gmane.orgp://about.me/hassanschroeder > > twitter: @hassan-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.