I have a controller action that I am going to request. The response is as follows.
return send_file(@image_path,
:disposition => 'inline',
:filename => @image.title,
:type => @image.content_type)
What I want to achieve is, in my ajax success function, I would like to call a div and set its background to this response image. How can I achieve this.
Aucun commentaire:
Enregistrer un commentaire