开发者

Convert Byte Array into HTML Image with Rails?

开发者 https://www.devze.com 2023-01-17 10:29 出处:网络
I have a Byte Array field being returned to me by the database, and in the view, I need to somehow output that as an image.How开发者_如何学JAVA would I do that in Rails?

I have a Byte Array field being returned to me by the database, and in the view, I need to somehow output that as an image. How开发者_如何学JAVA would I do that in Rails?

Many thanks, M


You need send this byte by send_data helper.

http://api.rubyonrails.org/classes/ActionController/LogSubscriber.html#method-i-send_data

You need you define another URL who send only this data_byte.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号