File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

Overview

jQuery File Upload

Contents

Description

File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.

Demo

Demo File Upload

Features

  • Multiple file upload:
    Allows to select multiple files at once and upload them simultaneously.
  • Drag & Drop support:
    Allows to upload files by dragging them from your desktop or file manager and dropping them on your browser window.
  • Upload progress bar:
    Shows a progress bar indicating the upload progress for individual files and for all uploads combined.
  • Cancelable uploads:
    Individual file uploads can be canceled to stop the upload progress.
  • Resumable uploads:
    Aborted uploads can be resumed with browsers supporting the Blob API.
  • Chunked uploads:
    Large files can be uploaded in smaller chunks with browsers supporting the Blob API.
  • Client-side image resizing:
    Images can be automatically resized on client-side with browsers supporting the required JS APIs.
  • Preview images, audio and video:
    A preview of image, audio and video files can be displayed before uploading with browsers supporting the required APIs.
  • No browser plugins (e.g. Adobe Flash) required:
    The implementation is based on open standards like HTML5 and JavaScript and requires no additional browser plugins.
  • Graceful fallback for legacy browsers:
    Uploads files via XMLHttpRequests if supported and uses iframes as fallback for legacy browsers.
  • HTML file upload form fallback:
    Allows progressive enhancement by using a standard HTML file upload form as widget element.
  • Cross-site file uploads:
    Supports uploading files to a different domain with cross-site XMLHttpRequests or iframe redirects.
  • Multiple plugin instances:
    Allows to use multiple plugin instances on the same webpage.
  • Customizable and extensible:
    Provides an API to set individual options and define callback methods for various upload events.
  • Multipart and file contents stream uploads:
    Files can be uploaded as standard "multipart/form-data" or file contents stream (HTTP PUT file upload).
  • Compatible with any server-side application platform:
    Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.

Security

⚠️ Please read the VULNERABILITIES document for a list of fixed vulnerabilities

Please also read the SECURITY document for instructions on how to securely configure your Web server for file uploads.

Setup

jQuery File Upload can be installed via NPM:

npm install blueimp-file-upload

This allows you to include jquery.fileupload.js and its extensions via node_modules, e.g:

<script src="node_modules/blueimp-file-upload/js/jquery.fileupload.js"></script>

The widget can then be initialized on a file upload form the following way:

$('#fileupload').fileupload();

For further information, please refer to the following guides:

Requirements

Mandatory requirements

Optional requirements

Cross-domain requirements

Cross-domain File Uploads using the Iframe Transport plugin require a redirect back to the origin server to retrieve the upload results. The example implementation makes use of result.html as a static redirect page for the origin server.

The repository also includes the jQuery XDomainRequest Transport plugin, which enables limited cross-domain AJAX requests in Microsoft Internet Explorer 8 and 9 (IE 10 supports cross-domain XHR requests).
The XDomainRequest object allows GET and POST requests only and doesn't support file uploads. It is used on the Demo to delete uploaded files from the cross-domain demo file upload service.

Browsers

Desktop browsers

The File Upload plugin is regularly tested with the latest browser versions and supports the following minimal versions:

  • Google Chrome
  • Apple Safari 4.0+
  • Mozilla Firefox 3.0+
  • Opera 11.0+
  • Microsoft Internet Explorer 6.0+

Mobile browsers

The File Upload plugin has been tested with and supports the following mobile browsers:

  • Apple Safari on iOS 6.0+
  • Google Chrome on iOS 6.0+
  • Google Chrome on Android 4.0+
  • Default Browser on Android 2.3+
  • Opera Mobile 12.0+

Extended browser support information

For a detailed overview of the features supported by each browser version and known operating system / browser bugs, please have a look at the Extended browser support information.

Testing

The project comes with three sets of tests:

  1. Code linting using ESLint.
  2. Unit tests using Mocha.
  3. End-to-end tests using blueimp/wdio.

To run the tests, follow these steps:

  1. Start Docker.
  2. Install development dependencies:
    npm install
  3. Run the tests:
    npm test

Support

This project is actively maintained, but there is no official support channel.
If you have a question that another developer might help you with, please post to Stack Overflow and tag your question with blueimp jquery file upload.

License

Released under the MIT license.

Comments
  • Error: SyntaxError: Unexpected token <

    Error: SyntaxError: Unexpected token <

    Hi im trying to upload images files but everytime i push upload

    i get this - Error: SyntaxError: Unexpected token <

    pleas help and thx for any help.

    opened by Dacarts 56
  • Upload multiple files directly to S3?

    Upload multiple files directly to S3?

    I have been using Jquery-file-upload plugin with paperclip and S3 for quite a while now and I really like it. However, as the files I need to upload become bigger, uploading directly to S3 becomes my only choice.

    This article demonstrates how to upload a single file to S3, unfortunately it doesn't do multiple files uploading.
    https://github.com/blueimp/jQuery-File-Upload/wiki/Upload-directly-to-S3

    so my question is, is it possible to iterate through a list of files and create a single post form for each file on the fly?

    Or is it possible to create an independent form and then repopulate the field in each iteration?

    Any tips are greatly appreciated.

    opened by Kickyourassforever 50
  • Retain EXIF and ICC headers with client-side image processing

    Retain EXIF and ICC headers with client-side image processing

    It seems like it should be possible to retain the ICC and EXIF data by extracting the APP2 segment data from the original image and re-attach it to the resized image.

    ICC Color Profiles? For those unfamiliar, let me explain: Perhaps you have heard of sRGB, RGB, CMYK, etc. These are color mappings that instruct devices how to render the colors. When this data is stripped from the image, the colors get all fucked up. Eg. CMYK image is upload, profile is stripped, server displays image, browser reads is as untagged RGB, displays in sRGB color space, resulting wrong colors. Blues shift to purple, grey to black, etc.

    Normally the best way to manage mismatched color spaces is through conversion with Image Magick (reading the source profile and then converting to sRGB, which is a standardized color profile for computer monitors).

    However, once the image has the ICC profile stripped with Canvas resize, the conversion cannot be peformed in Image magick because the original color space is unknown.

    I've seen a solution for this (Grabbing the ICC info from the JPG header and reinserting it) in pupload: https://github.com/moxiecode/plupload/blob/master/src/javascript/plupload.html5.js

    However, I have been unsuccessful thus far in integrating it.

    feature 
    opened by edeis 38
  • All works but

    All works but "Empty file upload result" error appears

    I'm using basic example and keep getting "Empty file upload result" error although all files are uploading correctly. I checked permissions for "files" and "thumbnails" folders - it's okay too (I tried 775 and 777). Can somebody help me?

    opened by michellekg 36
  • Problems with iframe upload

    Problems with iframe upload

    So I had the uploader setup and working just fine, or so I thought ... turns out it didn't work in IE because it (in all its iterations) does not support AJAX uploads. So I've been trying to get it to work with the options 'forceIframeTransport' set to true.

    I have the basic plugin included, the iframe-transport file too ... and I have the upload script on the server returning text/html as advised in the documentation. I have it working ... almost ... all the variables are getting sent to the server properly except the actual file and I can't figure out why.

    At first I thought it was just an IE thing, but with the 'forceIframeTransport' option set to true, google Chrome is doing the same thing.

    I 'm worried that I might not fully understand what 'The Iframe Transport requires a file input selection to upload files.' means. I have a file input, which I'm using to add file info to the UI for each file selection ... is there something I'm missing?

    opened by concept47 33
  • Problem with new codeigniter example

    Problem with new codeigniter example

    Hello, I tried to setup codeigniter with new example, but I keep getting error when I click "Start Upload": Unable to load the requested file: upload.php

    Images are uploaded in the uploads file, but the error is there (setup I made is the same as one in the example). Also, at the end of example author put following line: I had a problem with seeing images/thumbnails initially then I realized I had not set uploads/ directory in my .htacces file

    I am new to .htacces, so I don't know how to do this part. Can someone help me?

    opened by Brav 31
  • Plugin does not initialize with Version 5.0

    Plugin does not initialize with Version 5.0

    When I'm trying to initialize the plugin on the file upload control

    if('undefined' !== $.type($('input[type=file][name=userfile]')[0])) {
        var file_input = $('input[type=file][name=userfile]');
    
        file_input.fileUploadUI({
            uploadTable: $('#files'),
            buildUploadRow: function (files, index, handler) {
                return $('<tr><td>' + files[index].name + '<\/td>' +
                        '<td class="file_upload_progress"><div><\/div><\/td>' +
                        '<td class="file_upload_cancel">' +
                        '<button class="ui-state-default ui-corner-all" title="Cancel">' +
                        '<span class="ui-icon ui-icon-cancel">Cancel<\/span>' +
                        '<\/button><\/td><\/tr>');
            },
        });
    }
    

    it says: file_input.fileUploadUI is not a function

    All the dependencies are present, either css or js files, Firebug shows them loaded and ready to run.

    Some info: I'm using it in SugarCRM environment, so I've added the links to the files into the head part of the page, where the scripts and styles normally should be. The idea was to apply and initialize it to file upload control programmatically only in the case, when this control is present in the form. I don't want to apply this plugin to the whole form because this form is a part of Wizard step and any intervention into the form's normal functionality will destroy the wizard logic. The only task, the plugin can do for me is form-independent upload of the imported file before the user goes to the next Wizard step.

    Also, the Steps load themselves via AJAX ($('#content_td').html(xhr.responseText)), so there is no place for $(function) like in the examples, because it requires the page to be reloaded to initialize it.

    If it is not a bug and I'm doing anything wrong, please help me to figure out what it exactly is. Thank you.

    opened by gadeshi 30
  • IE 8 problem

    IE 8 problem

    Itry the new code on firefox and all go well, but if i try to upload a file on ie 8 a pop up show out asking me to download upload.php file. Anyone know why?

    opened by Manolo2 30
  • Error: [object Error]  in Internet Explorer

    Error: [object Error] in Internet Explorer

    Great project, thank you!

    However, I'm trying to implement the uploader. It works perfectly in FF, Chrome and Safari, but IE7, 8, 9 all fail to load the JSON response correctly.

    My server-side uploader is correctly making the images on the server, but IE only returns Error: [object Error] highlighted in red, rather than the JSON return of thumbnail, url etc.

    Are there any tips or guidance you can supply on trying to resolve or debug this IE only issue?

    opened by carlospictor 28
  • IE9 Cross domain upload issue

    IE9 Cross domain upload issue

    Hi, while trying to upload to distance server, im getting this error:

    SCRIPT5: Access is denied. jquery.js, line 3241 character 6

    When i comment iframe_transport.js and include xdr-transport.js i stop getting the error and the post request send but the file isnt (empty $_FILE on server) and i get this error: No conversion from text to iframe

    Any ideas? Thanks.

    opened by orenyakobi 27
  • iOS + EXIF Orientation Broken

    iOS + EXIF Orientation Broken

    This was an issue previously but was fixed but it appears it's back but with strange symptoms.

    The scenario:

    • Open the demo website in iOS 6 device (I am on latest version of 6)
    • Upload a photo taken on the device
    • Preview and final upload result have correct orientation on iOS in safari and used as img src: Image gallery - http://c.sampotts.me/RSlx Safari - http://c.sampotts.me/RTA6
    • View it directly in a browser, no problems: http://c.sampotts.me/RSK1
    • The problems start when you then use within a web page (img src): Chrome - http://c.sampotts.me/RSau Safari - http://c.sampotts.me/RT8z Firefox - http://c.sampotts.me/RSX1

    It seems all orientations on iOS result in strange output.

    Obviously this boils down to the EXIF orientation as regular portrait and landscape images taken with a DSLR are not an issue. I've not looked into it but I believe there are 8 possible EXIF orientation values, perhaps it's possible to reset the correct value. I'll look into it further and report back.

    opened by ghost 26
  • $.type is deprecated

    $.type is deprecated

    Using $.type is deprecated according to the jQuery Migration 3.3.2 tool.

    See: https://github.com/jquery/jquery-migrate/blob/main/warnings.md#jqmigrate-jquerytype-is-deprecated

    Cause: This method returns a string that indicates the type of the argument, for example "number" or "function". However, as the JavaScript language evolves this method has become problematic because new language constructs might require this function to either return a new string (potentially breaking existing code) or somehow map new constructs into existing strings (again, potentially breaking existing code). Examples of new recent JavaScript features include asynchronous functions, class constructors, Symbols, or functions that act as iterators.

    Solution: Review code that uses jQuery.type() and use a type check that is appropriate for the situation. For example. if the code expects a plain function, check for typeof arg === "function".

    opened by melloware 2
  • Client side resize bad aliasing depending on browser

    Client side resize bad aliasing depending on browser

    Hello,

    This is not so much a "bug" as trying to learn about something we observe and maybe understanding if there can be improvements.

    We use client side resize in jquery upload to resize images to around 1200x825px height.

    We've noticed that Firefox and Chrome have noticeably different image quality after resize, but both leave much more aliasing in angled lines than server side Imagick does with its default filters (Lanczos or Mitchell).

    Is this something that can be improved somehow? Are some browsers better than others with client side resize, and what are they?

    I took an image and uploaded with client side resize off, then with it "on" in Chrome and Firefox, and I cropped out a section from each sample to demonstrate the most obvious artifacts:

    example_resize_jqueryupload

    The angled line is the most obvious, but even if you look at the "psb speakers" logo you can clearly see the Imagic resize is cleaner than the other two, especially compared to Firefox which has the worst resize.

    Is there any way to set the client side resize to use better or different resize algorithms?

    feature 
    opened by redemption 2
  • Deprecated function usage in jquery-ui

    Deprecated function usage in jquery-ui

    There's been some work towards removing deprecated function usage over the last few months. It seems the below haven't been pointed out before, so here goes:

    jQuery.isArray is deprecated; use Array.isArray

    • https://github.com/blueimp/jQuery-File-Upload/blob/f5d629abdaf480fefad8ad823cb1e2c96805bd4e/js/jquery.fileupload-ui.js#L86

    jQuery. isFunction() is deprecated. In most cases, its use can be replaced by typeof x === "function"

    • https://github.com/blueimp/jQuery-File-Upload/blob/d2535157e6005eb3c37f7d0b0042462393139c5b/js/vendor/jquery.ui.widget.js#L134
    • https://github.com/blueimp/jQuery-File-Upload/blob/d2535157e6005eb3c37f7d0b0042462393139c5b/js/vendor/jquery.ui.widget.js#L276
    opened by bytestream 16
  • Callback after bulk delete

    Callback after bulk delete

    Bulk delete implementation simply looks up delete buttons of selected items in file list and triggers click on them.

    https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.fileupload-ui.js#L638

    Would be great if the delete requests get tracked and an event gets fired after bulk deletion completes.

    Usecase is reloading of some parts of the page after bulk delete.

    feature 
    opened by rnixx 1
  • Colors are changed when using Client-Side image resize

    Colors are changed when using Client-Side image resize

    Hello,

    When I'm uploading the attached photo and resizing the image using the 'imageMaxWidth' and 'imageMaxHeight' options, the image's colors are changed.

    When I'm not using the above options or set them to 'Number.MAX_SAFE_INTEGER', the colors are the same as the original image.

    Here is the original image: 20_Nis_Rogue_Sport-039-source

    Here is the result after uploaded to your demo site (which using 'imageMaxWidth' and 'imageMaxHeight'):

    bug 
    opened by cb-eli 1
Owner
Sebastian Tschan
🍌banana banana banana
Sebastian Tschan
Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.

Fine Uploader is no longer maintained and the project has been effectively shut down. For more info, see https://github.com/FineUploader/fine-uploader

Fine Uploader 8.2k Jan 2, 2023
FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.

FileAPI A set of JavaScript tools for working with files. Get started Download the files from the dist directory, and then: <div> <!-- "js-fileapi-

Free and open source software developed at Mail.Ru 3.6k Jan 3, 2023
A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.

Flow.js Flow.js is a JavaScript library providing multiple simultaneous, stable and resumable uploads via the HTML5 File API. (Demo) The library is de

HTML5 File upload 2.9k Dec 18, 2022
Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.

Dropzone is a JavaScript library that turns any HTML element into a dropzone. This means that a user can drag and drop a file onto it, and Dropzone wi

Dropzone 17k Dec 30, 2022
Multi Upload with Progress Bar in Vanilla JS

js-progress-bar-multi-upload Multi Upload with Progress Bar in Vanilla JS Youtube dersinde birlikte hazırladığımız çoklu progress barlı javascript upl

Tayfun Erbilen 11 Jun 10, 2022
A simple React App that plays Public Domain TV shows and integrates with Twitch Chat for the controls.

Public Domain Television for Twitch This application plays movies from Public Domain Movies The current version is only used to play Cartoons, but can

Ravavyr 8 Mar 29, 2022
🌊 A flexible and fun JavaScript file upload library

A JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user

pqina 13.2k Jan 3, 2023
runk is a simple file and folder sharer.

runk It is a simple file and folder sharer. It uses hyperswarm for sharing over network. Installation: Prerequisite: Node.js To mount, configured fuse

Amansinh Parmar 8 Mar 11, 2022
Moxiecode 5.6k Jan 1, 2023
Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.

Fine Uploader is no longer maintained and the project has been effectively shut down. For more info, see https://github.com/FineUploader/fine-uploader

Fine Uploader 8.2k Jan 2, 2023
FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.

FileAPI A set of JavaScript tools for working with files. Get started Download the files from the dist directory, and then: <div> <!-- "js-fileapi-

Free and open source software developed at Mail.Ru 3.6k Jan 3, 2023
A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.

Flow.js Flow.js is a JavaScript library providing multiple simultaneous, stable and resumable uploads via the HTML5 File API. (Demo) The library is de

HTML5 File upload 2.9k Dec 18, 2022
Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows

Make drag-and-drop easier using DropPoint! DropPoint helps you drag content without having to open side-by-side windows Works on Windows, Linux and Ma

Sudev Suresh Sreedevi 391 Dec 29, 2022
Quick One Liners in JavaScript, TypeScript, Python, Rust, Java, Ruby, C, C++

ONE LINERS This repository contains cool and simple one line utility functions to easily use common repetitive methods in JavaScript, TypeScript, Pyth

Divin Irakiza 3 Mar 2, 2022
A concise collection of classes for PHP, Python, JavaScript and Ruby to calculate great circle distance, bearing, and destination from geographic coordinates

GreatCircle A set of three functions, useful in geographical calculations of different sorts. Available for PHP, Python, Javascript and Ruby. Live dem

null 72 Sep 30, 2022
shouganaiyo-loader is a cross-platform Frida-based Node.js command-line tool that forces Java processes to load a Java/JVMTI agent regardless of whether or not the JVM has disabled the agent attach API.

shouganaiyo-loader: Forced Entry for Java Agents shouganaiyo-loader is a cross-platform Frida-based Node.js command-line tool that forces Java process

NCC Group Plc 20 Sep 19, 2022
An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.

bootstrap-fileinput An enhanced HTML 5 file input for Bootstrap 5.x, 4.x, and 3.x with file preview for various files, offers multiple selection, resu

Kartik Visweswaran 5.2k Jan 3, 2023
This plugin can generate timestamps for video, audio and Bilibili video, it takes you to the corresponding video/audio position when clicked.

logseq-plugin-media-ts 本插件能够生成视频、音频以及 B 站视频的时间戳,点击时间戳后会跳转到对应的音视频位置。 This plugin can generate timestamps for video, audio and Bilibili video, it takes

Seth Yuan 58 Jan 3, 2023
Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.

Dropzone is a JavaScript library that turns any HTML element into a dropzone. This means that a user can drag and drop a file onto it, and Dropzone wi

Dropzone 17k Dec 30, 2022
Material Progress —Google Material Design Progress linear bar. By using CSS3 and vanilla JavaScript.

MProgress.js Google Material Design Progress Linear bar. It uses CSS3 and vanilla JavaScript which doesn't depend on any other libraries. Types and pr

gc 1.5k Nov 30, 2022