Skip to content

Fix the content type of form uploads by using the file-utility.

License

Notifications You must be signed in to change notification settings

autohaus24/rack-fix-content-type

Repository files navigation

RackFixContentType

Fixes the content type of form uploads by using the file-utility. A lot of browsers screw up the content type so we don’t trust the given value in the header.

Usage

For rails, in environment.rb, just add

config.middleware.use "RackFixContentType::Middleware"

For sinatra, add

use RackFixContentType::Middleware

Other rack applications need to use the middleware accordingly.

License

Uses the MIT-LICENSE

About

Fix the content type of form uploads by using the file-utility.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages