Colin Law wrote: > On 20 July 2010 14:54, Hemant Bhargava <[email protected]> wrote: >>>> do it in models with validations. >>> >>> How are you checking the file attributes in the controller? >> >> Just like as >> if File.size(params[:upload_resume]) > 1mb >> �redirect_to :back with some flash[:notice] >> end > > Is params[:upload_resume] a filename on the users PC? I am probably > showing my ignorance here, but how does the server know the size of a > file on the users PC? I hope you are not testing this by 'uploading' > from a PC which is actually also the server running the rails app, so > that the file is directly accessible from the rails app before it is > uploaded.
Hello Colin, Thanks to you guys for you replies. Somehow i managed to do this. I created a virtual method to solve this. > > Colin -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

