carrierwave

https://github.com/carrierwaveuploader/carrierwave

Ruby

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks

CarrierWave::SanitizedFile#move_to

Moves the file to the given path

=== Parameters

[new_path (String)] The path where the file should be moved.
[permissions (Integer)] permissions to set on the file in its new location.
[directory_permissions (Integer)] permissions to set on created directories.

Source | Google | Stack overflow

Edit

git clone [email protected]:carrierwaveuploader/carrierwave.git

cd carrierwave

open lib/carrierwave/sanitized_file.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-CarrierWave--SanitizedFile-move_to-for-pr


# Commit to git

git add lib/carrierwave/sanitized_file.rbgit commit -m "better docs for CarrierWave::SanitizedFile#move_to"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-CarrierWave--SanitizedFile-move_to-for-pr

hub pull-request


# Celebrate!