Topic: Upload to the filesystem.

Can someone please direct me to a tutorial on uploading files to the filesystem? Also, is it possible to do this sort of file upload without attachment_fu or paperclip? I am using Rails 2.1.

Re: Upload to the filesystem.

me too!

Re: Upload to the filesystem.

What's wrong with attachment_fu and paperclip?

Re: Upload to the filesystem.

I did this getto save to filesystem.

Add this to your model.

  def save_file=(file)
    f = File.new("/public/files/#{file.original_filename}", "wb")
    f.write file.read
    f.close
  end

just change the "/public/files/" to point to where you want to save the file to.

call model.save_file=(upload_file)

Better then best intranet/calendaring app Tofuapp.com