Hi! I have simple rails application - users with name and avatar and in sinatra I want to create new user.
form for new user <form action="/users/create" enctype="multipart/form-data" method="post"> <p> <label for="name">Name: </label> <input type="text" id="name" name="user[name]" > </p> <p> <label for="avatar">Avatar: </label> <input type="file" id="avatar" name="avatar" > </p> <input type="submit" name="Commit" value="Create"> </form> My action in sinatra post '/users/create' do RestClient.post("http://localhost:3000/users", :user=>params['user']) redirect '/users' end I would like to sent file to server in this action. So the question is: How to sent file as a param to server ? I'm using mozilla firefox 3.6 so I can't get full file path to read it -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.