Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - dtaniwaki/rack-secure-upload: Upload files securely
Upload files securely. Contribute to dtaniwaki/rack-secure-upload development by creating an account on GitHub.
Visit SiteGitHub - dtaniwaki/rack-secure-upload: Upload files securely
Upload files securely. Contribute to dtaniwaki/rack-secure-upload development by creating an account on GitHub.
Powered by 0x5a.live 💗
rack-secure-upload
Upload files securely
Installation
Add the rack-secure-upload gem to your Gemfile.
gem "rack-secure-upload"
And run bundle install
.
Rack App
require 'rack-secure-upload'
use Rack::SecureUpload::Middleware, :fsecure
run MyApp
Rails App
In config/application.rb
module MyApp
class Application < Rails::Application
config.middleware.insert_before ActionDispatch::ParamsParser, Rack::SecureUpload::Middleware, :avast
end
end
Options
You can add some options like below.
use Rack::SecureUpload::Middleware, :fsecure, {foo: :bar}
fallback
proc { |env, params, path| }
- use return value of proc
:raise
- raise
Rack::SecureUpload::InsecureFileError
|
- raise
- else
- return
406
- return
AntiVirus Softwares
Avast
- Get license
- Install the package
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
F-Secure
- Get license (Optional)
- Install the package
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
Test this middleware
- Download eicar test file
- Upload it
You can try this with sample app
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright
Copyright (c) 2014 Daisuke Taniwaki. See LICENSE for details.
Ruby Resources
are all listed below.
GitHub - ahoward/forkoff: brain-dead simple parallel processing for ruby
resource
~/github.com
resource
GitHub - be9/acl9: Yet another role-based authorization system for Rails
resource
~/github.com
resource
GitHub - fphilipe/premailer-rails: CSS styled emails without the hassle.
resource
~/github.com
resource
GitHub - drapergem/draper: Decorators/View-Models for Rails Applications
resource
~/github.com
resource
GitHub - carmen-ruby/carmen: A repository of geographic regions for Ruby
resource
~/github.com
resource
GitHub - paper-trail-gem/paper_trail: Track changes to your rails models
resource
~/github.com
resource
GitHub - gjtorikian/html-pipeline: HTML processing filters and utilities
resource
~/github.com
resource
GitHub - kciter/simple-slack-bot: You can easily make Slack Bot!! :star:
resource
~/github.com
resource
GitHub - troessner/transitions: State machine extracted from ActiveModel
resource
~/github.com
resource
GitHub - mrkn/pycall.rb: Calling Python functions from the Ruby language
resource
~/github.com
resource
GitHub - elastic/elasticsearch-ruby: Ruby integrations for Elasticsearch
resource
~/github.com
resource
GitHub - codegram/spinach: Spinach is a BDD framework on top of Gherkin.
resource
~/github.com
resource
GitHub - mongoid/mongoid_search: Simple full text search for Mongoid ORM
resource
~/github.com
resource
Made with ❤️
to provide different kinds of informations and resources.