How to parse an uploaded txt file in Rails3
- by gkaykck
I have a form which have a file input;
<%form_tag '/dboss/newsbsresult' , :remote=>true do %>
<input type="file" id="examsendbutton" name="txtsbs"/><br/>
<input type="submit" value="Gonder">
<%end%>
Here i want the user to select a txt file which i try to parse and use at server, but i cannot catch the uploaded file with this code,
def newsbsresult
@u = params[:txtsbs] #Or params[:txtsbs].to_s
p @u
end
What is the true way of achieving this?