Fine Uploader 3.0Fine Uploader 3.0 now with optional jQuery wrapper

File uploading without the hassle.

Downloads Demos Docs

Introducing Fine Uploader

Welcome

This project attempts to achieve a user-friendly file-uploading experience over the web. It's built as a Javascript plugin for developers looking to incorporate file-uploading into their website.

Browser support

IE7+ (including IE10), Firefox, Safari (OS X), Chrome, IOS6, and Android are supported. Does NOT require Flash, jQuery, or any external libraries.

How it works

Uses an XMLHttpRequest (AJAX) for uploading multiple files with a progress-bar in FF3.6+, Safari4+, Chrome, and falls back to hidden-iframe-based upload in other browsers (namely IE), providing good user experience everywhere.

Server support

You can use any server technology. We have already seen implementations with:

ASP.NET ColdFusion Java Node.js Perl PHP Python

Fine Uploader in action

Features

  • Multiple file select, progress-bar in FF, Chrome, and Safari
  • Drag-and-drop file select in FF, Chrome, and Safari (OS X)
  • Uploads are cancelable
  • No external dependencies at all if using FineUploader or FineUploaderBasic. If using the optional jQuery wrapper, jQuery is of course required.
  • FineUploaderBasic only requires the associated Fine Uploader javascript file. All Fine Uploader css and image files can be omitted.
  • Doesn't use Flash
  • Fully working with HTTPS
  • Tested in IE7+, Firefox, Safari (OS X), Chrome, IOS6, and various versions of Android. IE10 is now also supported!
  • Ability to upload files as soon as they are selected, or "queue" them for uploading at user's request later
  • Display specific error messages from server on upload failure (hover over failed upload item)
  • Ability to auto-retry failed uploads
  • Option to allow users to manually retry a failed upload
  • Create your own file validator and/or use some default validators include with Fine Uploader
  • Receive callback at various stages of the upload process
  • Send any parameters server-side along with each file.
  • Any many more!

Setup

You can quickly set up an HTML page in order to use Fine Uploader:

  1. Download and unpack the latest version of Fine Uploader;
  2. Use one of the provided server scripts, or write down your own;
  3. Set up a basic markup to begin with;
  4. Have fun!

You can use the following basic markup:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Fine Uploader Demo</title>
    <link href="client/fineuploader.css" rel="stylesheet">
  </head>
  <body>
    <div id="fine-uploader"></div>

    <script src="client/fineuploader.js"></script>
    <script>
      function createUploader() {
        var uploader = new qq.FineUploader({
          // Pass the HTML element here
          element: document.getElementById('fine-uploader'),
          // or, if using jQuery
          // element: $('#fine-uploader')[0],
          // Use the relevant server script url here
          // if it's different from the default “/server/upload”
          request: {
            endpoint: 'server/handleUploads'
          }
        });
      }
    
      window.onload = createUploader;
    </script>
  </body>
</html>

Minimal Out-of-the-Box Demo

You can have a minimal setup without using neither jQuery nor Twitter Boostrap. You simply use the minimal HTML markup above. The relevant HTML tag and Javascript code for this demo are extracted on the right.

Here for the demo purposes, we active the debug mode (which defaults to false). You can see the logs in real time in your browser’s JavaScript console.

<div id="fine-uploader"></div>

<script>
  function createUploader() {
    var uploader = new qq.FineUploader({
      element: document.getElementById('fine-uploader'),
      request: {
        endpoint: 'server/handleUploads'
      },
      debug: true
    });
  }
  
  window.onload = createUploader;
</script>

Bootstrapped Minimal Demo

In order to style your uploader’s look, you can customize the template classes as you like.

We use here both Fine Uploader and Twitter Bootstrap’s CSS and add some styling reset.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Fine Uploader - Boostrapped Minimal Demo</title>
    <link href="client/fineuploader.css" rel="stylesheet">
    <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.min.css" rel="stylesheet">
    <style>
      /* Fine Uploader
      -------------------------------------------------- */
      .qq-upload-list {
        text-align: left;
      }

      /* For the bootstrapped demos */
      li.alert-success {
        background-color: #DFF0D8;
      }

      li.alert-error {
        background-color: #F2DEDE;
      }

      .alert-error .qq-upload-failed-text {
        display: inline;
      }
    </style>
  </head>
  <body>
    <div id="bootstrapped-fine-uploader"></div>

    <script src="client/fineuploader.js"></script>
    <script>
      function createUploader() {
        var uploader = new qq.FineUploader({
          element: document.getElementById('bootstrapped-fine-uploader'),
          request: {
            endpoint: 'server/handleUploads'
          },
          text: {
            uploadButton: '<i class="icon-upload icon-white"></i> Test me now and upload a file'
          },
          template: '<div class="qq-uploader span12">' +
                      '<pre class="qq-upload-drop-area span12"><span>{dragZoneText}</span></pre>' +
                      '<div class="qq-upload-button btn btn-success" style="width: auto;">{uploadButtonText}</div>' +
                      '<ul class="qq-upload-list" style="margin-top: 10px; text-align: center;"></ul>' +
                    '</div>',
          classes: {
            success: 'alert alert-success',
            fail: 'alert alert-error'
          },
          debug: true
        });
      }
        
      window.onload = createUploader;
    </script>
  </body>
</html>

jQuery Wrapper Minimal Demo

In addition to the minimal out-of-the-box demo, we include here Fine Uploader’s jQuery wrapper.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Fine Uploader - jQuery Wrapper Minimal Demo</title>
    <link href="client/fineuploader.css" rel="stylesheet">
  </head>
  <body>
    <div id="jquery-wrapped-fine-uploader"></div>

    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script src="client/fineuploader.js"></script>
    <script src="client/js/jquery-plugin.js"></script>
    <script>
      $(document).ready(function () {
        $('#jquery-wrapped-fine-uploader').fineUploader({
          request: {
            endpoint: 'server/handleUploads'
          },
          debug: true
        });
      });
    </script>
  </body>
</html>

More demos