carrierwave
https://github.com/carrierwaveuploader/carrierwave
Ruby
Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
CarrierWave::SanitizedFile#copy_to
Creates a copy of this file and moves it to the given path. Returns the copy. === Parameters [new_path (String)] The path where the file should be copied to. [permissions (Integer)] permissions to set on the copy [directory_permissions (Integer)] permissions to set on created directories. === Returns
Edit
git clone [email protected]:carrierwaveuploader/carrierwave.git
cd carrierwave
open lib/carrierwave/sanitized_file.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-CarrierWave--SanitizedFile-copy_to-for-pr
# Commit to gitgit add lib/carrierwave/sanitized_file.rbgit commit -m "better docs for CarrierWave::SanitizedFile#copy_to"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-CarrierWave--SanitizedFile-copy_to-for-pr
hub pull-request
# Celebrate!