Based on your question, if I understand that this is correct. You want to read data from a download file. I managed to run a similar thing, which should show the loaded text in a different text area of my Rails application.
Here is what I did.
View
1 <%= form_tag('/dboss/newsbsresult' , :multipart => true) do %>
2 <input type="file" id="examsendbutton" name="txtsbs"/><br/>
3 <input type="submit" value="Gonder">
4 <% end %>
controller
1 def index
2 if (params[:txtsbs].present?)
3 @upload_text = params[:txtsbs].read
4 render :text => @upload_text
5 end
6 end
Route
match 'dboss/newsbsresult' => 'user#index'
source
share