I have a form (Rails) which allows me to load a .csv file using the file_field
.
In the view:
<% form_for(:upcsv, :html => {:multipa
.length and .size are actually synonyms. to get the rowcount of the csv file you have to actually parse it. simply counting the newlines in the file won't work, because string fields in a csv can actually have linebreaks. a simple way to get the linecount would be:
CSV.read(params[:upcsv][:filename]).length