Skip to content

Upgrade to latest version #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

[jQuery-File-Plugin](https://github.com/blueimp/jQuery-File-Upload) is a file upload plugin written by [Sebastian Tschan](https://github.com/blueimp). jQuery File Upload features multiple file selection, drag&drop support, progress bars and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing.

jquery-fileupload-rails is a library that integrates jQuery File Upload for Rails 3.1 Asset Pipeline (Rails 3.2 supported).
jquery-fileupload-rails is a library that integrates jQuery Fule Upload for Rails 3.1 and higher.

## Plugin versions

* jQuery File Upload User Interface Plugin 6.11
* jQuery File Upload Plugin 5.19.3
* jQuery UI Widget 1.9.1+amd
* jQuery File Upload User Interface Plugin 8.8.5
* jQuery File Upload Plugin 5.32.6
* jQuery UI Widget 1.10.3+amd

## Installing Gem

Expand All @@ -22,15 +22,13 @@ Require jquery-fileupload in your app/assets/application.js file.

The snippet above will add the following js files to the mainfest file.

//= require jquery-fileupload/vendor/jquery.ui.widget
//= require jquery-fileupload/vendor/load-image
//= require jquery-fileupload/vendor/canvas-to-blob
//= require jquery-fileupload/vendor/tmpl
//= require jquery-fileupload/jquery.iframe-transport
//= require jquery-fileupload/jquery.fileupload
//= require jquery-fileupload/jquery.fileupload-fp
//= require jquery-fileupload/jquery.fileupload-ui
//= require jquery-fileupload/locale
//=require jquery-fileupload/vendor/jquery.ui.widget
//=require jquery-fileupload/vendor/load-image/load-image
//=require jquery-fileupload/vendor/canvas-to-blob
//=require jquery-fileupload/vendor/tmpl
//=require jquery-fileupload/jquery.iframe-transport
//=require jquery-fileupload/jquery.fileupload
//=require jquery-fileupload/jquery.fileupload-ui

If you only need the basic files, just add the code below to your application.js file. [Basic setup guide](https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin)

Expand All @@ -42,12 +40,31 @@ The basic setup only includes the following files:
//= require jquery-fileupload/jquery.iframe-transport
//= require jquery-fileupload/jquery.fileupload

## Using the stylesheet
## Usign the stylesheet

Require the stylesheet file to app/assets/stylesheets/application.css

*= require jquery.fileupload

Or, if you are using jQuery UI

*= require jquery.fileupload-ui

## Using the load-image

You can use full version of load-image library:

//= require jquery-fileupload/vendor/load-image

or use some parts:

//= require ./load-image
//= require ./load-image-orientation
//= require ./load-image-meta
//= require ./load-image-ios
//= require ./load-image-exif
//= require ./load-image-exif-map

## Using the middleware

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.
Expand All @@ -65,7 +82,7 @@ need a pro account to watch it though.
Thanks to [Sebastian Tschan](https://github.com/blueimp) for writing an awesome file upload plugin.

## License
Copyright (c) 2012 Tors Dalid
Copyright (c) 2013 Tors Dalid

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Expand Down
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery postMessage Transport Plugin 1.1
* jQuery postMessage Transport Plugin 1.1.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
Expand Down Expand Up @@ -64,8 +64,9 @@
xhrUpload = options.xhr().upload;
return {
send: function (_, completeCallback) {
counter += 1;
var message = {
id: 'postmessage-transport-' + (counter += 1)
id: 'postmessage-transport-' + counter
},
eventName = 'message.' + message.id;
iframe = $(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//=require jquery-fileupload/vendor/jquery.ui.widget
//=require jquery-fileupload/vendor/load-image
//=require jquery-fileupload/vendor/load-image/load-image
//=require jquery-fileupload/vendor/canvas-to-blob
//=require jquery-fileupload/vendor/tmpl
//=require jquery-fileupload/jquery.iframe-transport
//=require jquery-fileupload/jquery.fileupload
//=require jquery-fileupload/jquery.fileupload-fp
//=require jquery-fileupload/jquery.fileupload-ui
//=require jquery-fileupload/locale
Loading