Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A very simple, very flexible, asynchronous file upload component.
JavaScript PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
demo
.gitignore
README.md
jquery.uploader.js

README.md

jQuery Asynchronous Upload Plugin

What is it?

Turns an element into an asynchronous file upload trigger.

  • bare-bones ajax file upload functionality
  • no built-in ui (other than a required trigger element)
  • hooks for attaching your own ui interactions
  • optionally post data along with the file
  • fully customizable server-side response handling/formatting
  • html4 iframe implementation only (no progress reporting)
  • single file upload per trigger

How to Use it

HTML

<input type="button" id="myUploadButton" value="Upload a File">

JavaScript

$(function () {

    $('#myUploadButton').uploader({
        url : '/some-upload-handler.php',
        inputName : 'my_upload_file', 
        data : {   // optional
            someKey : 'some value',
            anotherKey : 'some other value'
        }, 
        onStart : function () {
            $('body').append('Upload started...');
        },
        onComplete : function (response) {
            $('body').append('Upload finished. Response: '+response);
        }
    });

});
Something went wrong with that request. Please try again.