Publisher review:Home-brewed file upload in Ruby on Rails - sanitize_filename doesn't have to be a private method, make it public if you want. All of these lines go in the model, which for me has a :file and :content_type attributes. :file stores the complete path to the uploaded file.
Be sure to change the string in path_to_file to the place where you want files stored, and that proper permissions are set on that path. Also, sanitize_filename doesn't have to be a private method - make it public if you want.
Home-brewed file upload in Ruby on Rails is a Ruby script for Snippets scripts design by seancribbs.
It runs on following operating system: Windows / Linux.
Operating system:Windows / Linux