File API uploading with progress bar using JQuery and XHR.
JavaScript Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
public
spec/javascripts
views
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru
jquery-attach.rb

README.md

Upload files using JQuery, the File API, and XMLHttpRequests. This currently will only work in Firefox and Chrome, and provides accurate progress reporting.

Development Setup

  • gem install bundler
  • bundle install

Running the Example

Running Specs

  • evergreen serve

Demo

JQuery.attach

Requirements

  • JQuery 1.7.1+
  • Firefox 9
  • Chrome 16

Usage

Attach the functionality to a file form field.

$("#upload").attach({ url: "/upload" });

Download

jquery.attach.js