ruby - Download Blob file in Rails App is shown inline and not attached -
i blob function in oracle datenbank. users of rails app should able download these blob. problem is, after clicking on download, blob file shown inline in browser, should download file.
link:
= link_to export_pldw_plausibility_path, :class => "btn btn-primary action-button" %span.glyphicon.glyphicon-pencil %span.hidden-xs = "export"
route:
resources :pldw_plausibilities 'export', on: :member end
controller:
def export send_data pldwplausibility.export(params[:id]), :filename => "test.blob", :disposition => 'attachment' end
model:
def self.export(id) return plsql.pld.pld_mdc.exportmdoc('pld_plausibility', id.to_i) end
sorry!
adding :target => "_blank"
link solves problem..
Comments
Post a Comment