I am using ruby and sinatra. I need to create a website that allows the user to upload a zipfile of other websites and display all of them in multiple iframes on the page but I'm not sure how to even start this.
so far I have made the website that can upload a zipfile and have placed it in an uploads folder and i can display that on website by doing
<iframe src="../uploads/test.html" width="100%" height="600">
<p>Your browser does not support iframes.</p>
</iframe>
post '/upload' do
File.open('uploads/' + params['file'][:filename], 'w') do |f|
f.write(params['file'][:tempfile].read)
end
end
the thing is i wont necessarily know the names of the html files or how many there are to just place the name of it