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 - > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

