I need to upload Word and Excel files on my site.
I create a upload form, upload the file and save it like this:
f = File.new("public/files/#{user.id.to_s}/filename", "w+")
f.write params[:file].read
f.close
Word and Excel files must be saved as binary data.
Sadly the Filemode "b" is only for windows and I'm under linux.
What to do?
Yours,
Joern