require 'socket'
server = TCPServer.new('127.0.0.1', 4500)
while client = server.accept do
data = client.gets
client.write("<html>
<body>
<p>image </p>`enter code here`
<img src = \"download.jpg\" /></body></html>")
client.close
end
I am trying to load an image in local storage (same location as the ruby script). But the image shows blank in browser. Please suggest a ruby solution(not rails). Image gets loaded when external web link is given, but not local storage. Thanks in advance
Aucun commentaire:
Enregistrer un commentaire