i guess that's the point in that the browser is not displaying the image -- it is just displaying the error gif, ie, a box with a red x in it indicating that i can't load the image.
Fred, i really appreciate the time you're dedicating here... On Oct 8, 9:51 am, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On 8 Oct 2008, at 15:47, Lastps wrote: > > > > > logs say that all is ok: > > Sending data my_image.jpg > > Completed in 0.09400 (10 reqs/sec) | Rendering: 0.00000 (0%) | DB: > > 0.08000 (85%) | 200 OK [http://localhost/photo/get_image/5] > > > Interesting question you ask about how do the bytes differ. I guess I > > first need to find a "tool of my choice" other than my two browsers > > (IE and Firefox) -- any suggestions? > > using the browser to save the image to disk would be one way. > > Fred > > > > > > > On Oct 8, 9:18 am, Frederick Cheung <[EMAIL PROTECTED]> > > wrote: > >> On 8 Oct 2008, at 15:05, Lastps wrote: > > >>> Thanks for the suggestion -- > >>> I get the same red box with the x. > > >> Do the logs indicate that an error occured ? If not and if you use > >> the > >> tool of your choice to download the image, how do the bytes differ > >> from the bytes you would expect. > > >> Fred > > >>> On Oct 8, 8:47 am, Frederick Cheung <[EMAIL PROTECTED]> > >>> wrote: > >>>> On Oct 8, 2:32 pm, Lastps <[EMAIL PROTECTED]> wrote: > > >>>>> I am using image_tag to load an image that I've saved to the > >>>>> database > >>>>> (using attachment_fu if you're curious but that's probably not > >>>>> relevant here): > > >>>> I'd copy and paste that image link into the browser (ie > >>>> yourserver,com/ > >>>> photo/get_image/5) and see what the browser pulls out. > > >>>> Fred > > >>>>> VIEW > >>>>> <%= image_tag '/photo/get_image/5' %> > > >>>>> CONTROLLER > >>>>> def get_image > >>>>> @photo=Photo.find(params[:id]) > >>>>> send_data(DbFile.find(@photo.db_file_id).data, > >>>>> :type => @photo.content_type, > >>>>> :file_name => > >>>>> @photo.filename, > >>>>> :disposition => 'inline') > >>>>> end > > >>>>> The images I'm saving are less than 100kb and easily handled by my > >>>>> mysql column of db_file.data which is declared MEDIUMBLOB. > > >>>>> My problem is that the view works perfectly in production but > >>>>> not at > >>>>> all in development -- in development I just get a broken image > >>>>> graphic > >>>>> with a box and a red x. > > >>>>> Any ideas on how to troubleshoot this? Since it doesn't seem to > >>>>> be my > >>>>> code (it works fine in production) I'm at a loss on how to figure > >>>>> this > >>>>> out.- Hide quoted text - > > >>>> - Show quoted text -- Hide quoted text - > > >> - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

