All Projects → dtaniwaki → rack-secure-upload

dtaniwaki / rack-secure-upload

Licence: MIT license
Upload files securely

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to rack-secure-upload

blobUpload
Uses file slice to upload large files. Newer version https://github.com/apivideo/uploadavideoApps. From api.video (https://api.video)
Stars: ✭ 19 (-74.67%)
Mutual labels:  upload
slack-emoji-upload
Slack emoji uploader, CLI. single binary, no dependencies. linux, osx, windows.
Stars: ✭ 28 (-62.67%)
Mutual labels:  upload
miniprogram-network
Redefine the Network API of Wechat MiniProgram (小程序网络库)
Stars: ✭ 93 (+24%)
Mutual labels:  upload
windows-azure-storage
Use the Microsoft Azure Storage service to host your website's media files.
Stars: ✭ 48 (-36%)
Mutual labels:  upload
apkup
🚀 Publish APKs to Google Play directly from the terminal
Stars: ✭ 33 (-56%)
Mutual labels:  upload
dredd-rack
The Dredd API blueprint testing tool for your Rack applications.
Stars: ✭ 50 (-33.33%)
Mutual labels:  rack
direct-upload-s3-signaturev4
Example of Directly uploading files to S3 with PHP
Stars: ✭ 50 (-33.33%)
Mutual labels:  upload
ngx-dropzone
A highly configurable dropzone component for Angular.
Stars: ✭ 123 (+64%)
Mutual labels:  upload
wp-graphql-upload
Upload support and functionality for WPGraphQL as specified by graphql-multipart-request-spec.
Stars: ✭ 26 (-65.33%)
Mutual labels:  upload
gitup
Laravel package to upload git commits to server(s) via (s)ftp.
Stars: ✭ 20 (-73.33%)
Mutual labels:  upload
tiny-qiniu-request
tiny-qiniu for rc-upload or antd upload component `customRequest` property
Stars: ✭ 13 (-82.67%)
Mutual labels:  upload
hanami-shrine
Upload solution for Hanami using Shrine library
Stars: ✭ 28 (-62.67%)
Mutual labels:  upload
file-upload
koa2 middleware support upload to cos/oss/obs/aws/local
Stars: ✭ 28 (-62.67%)
Mutual labels:  upload
PHP-FileUpload
Simple and convenient file uploads — secure by default
Stars: ✭ 53 (-29.33%)
Mutual labels:  upload
encrypted cookie
AES-128 encrypted session cookies for Rack (and Sinatra and other frameworks).
Stars: ✭ 54 (-28%)
Mutual labels:  rack
lambda-multipart-parser
This nodejs module will parse the multipart-form containing files and fields from the AWS lambda event object. It works very well parsing binary and text files.
Stars: ✭ 45 (-40%)
Mutual labels:  upload
chrome-extension-upload
upload & publish extensions to the Chrome Web Store.
Stars: ✭ 35 (-53.33%)
Mutual labels:  upload
jiotty-photos-uploader
Uploads your media files to Google Photos creating albums based on the directory structure
Stars: ✭ 54 (-28%)
Mutual labels:  upload
nova-filepond
A Nova field for uploading File, Image and Video using Filepond.
Stars: ✭ 36 (-52%)
Mutual labels:  upload
media-command
Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
Stars: ✭ 40 (-46.67%)
Mutual labels:  upload

rack-secure-upload

Gem Version Dependency Status Build Status Coverage Status Code Climate

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 |
  • else
    • return 406

AntiVirus Softwares

Avast

  1. Get license
  2. 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

  1. Get license (Optional)
  2. 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

  1. Download eicar test file
  2. Upload it

You can try this with sample app

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2014 Daisuke Taniwaki. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].