我现在在ruby中已经把图片保存到数据库中,但是读不出来,
我是这样写的
def picture
@rypicture = RyPicture.find(params[:id])
send_data(@rypicture.data,
:filename => @rypicture.name,
:type => @rypicture.content_type,
:disposition => 'inline')
end
在show界面上该如何写呢?
我是这样写的
def picture
@rypicture = RyPicture.find(params[:id])
send_data(@rypicture.data,
:filename => @rypicture.name,
:type => @rypicture.content_type,
:disposition => 'inline')
end
在show界面上该如何写呢?