Skip to content

Commit 2b70bfc

Browse files
committed
add middleware stuff to Readme
1 parent e325434 commit 2b70bfc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ Require the stylesheet file to app/assets/stylesheets/application.css
9191
progress = parseInt(data.loaded / data.total * 100, 10)
9292
$("#progress .bar").css "width", progress + "%"
9393
return
94+
95+
## Using the middleware
96+
97+
The `jquery.iframe-transport` fallback transport has some special caveats regarding the response data type, http status, and character encodings. `jquery-fileupload-rails` includes a middleware that handles these inconsistencies seamlessly. If you decide to use it, create an initializer that adds the middleware to your application's middleware stack.
98+
99+
Rails.application.config.middleware.use JQuery::FileUpload::Rails::Middleware
94100

95101
## Thanks
96102
Thanks to [Sebastian Tschan](https://github.com/blueimp) for writing an awesome file upload plugin.

0 commit comments

Comments
 (0)