Upload files securely
Upload files securely
Add the rack-secure-upload gem to your Gemfile.
gem "rack-secure-upload"
And run bundle install
.
require 'rack-secure-upload'
use Rack::SecureUpload::Middleware, :fsecure
run MyApp
In config/application.rb
module MyApp
class Application < Rails::Application
config.middleware.insert_before ActionDispatch::ParamsParser, Rack::SecureUpload::Middleware, :avast
end
end
You can add some options like below.
use Rack::SecureUpload::Middleware, :fsecure, {foo: :bar}
proc { |env, params, path| }
:raise
Rack::SecureUpload::InsecureFileError
|406
wget -c http://files.avast.com/files/linux/avast4workstation-1.3.0-1.i586.rpm
sudo yum localinstall avast4workstation-1.3.0-1.i586.rpm
avast -V # Input your license
avast-update
wget http://download.f-secure.com/webclub/f-secure-linux-security-10.00.60.tar.gz
tar xvzf f-secure-linux-security-10.00.60.tar.gz
sudo ./f-secure-linux-security-10.00.60/f-secure-linux-security-10.00.60
You can try this with sample app
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright © 2014 Daisuke Taniwaki. See LICENSE for details.