Guest User

Untitled

a guest
Aug 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. Rails/Ruby: uploading a binary File and writing it with a File-Object
  2. f = File.new("public/files/#{user.id.to_s}/filename", "w+")
  3. f.write params[:file].read
  4. f.close
Add Comment
Please, Sign In to add comment