jQuery-File-Upload README

The project's README from github.com/blueimp/jQuery-File-Upload. As one markdown file: README.md.

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

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:

Mobile browsers

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

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.

jQuery-File-Upload (blueimp/jQuery-File-Upload)

Searching Database…

30.7K ·GitHub
archived
Что это?jQuery File Upload — это виджет jQuery, который добавляет в любую HTML-форму загрузки файлов выбор нескольких файлов, перетаскивание (drag & drop), полосы прогресса загрузки, предпросмотр изображений, аудио и видео, а также возобновляемую загрузку и загрузку по частям. Работает он практически с любым серверным бэкендом.
Это самостоятельное приложение или плагин, который я добавляю на страницу?Это клиентский плагин (виджет) на jQuery: вы подключаете его к существующей HTML-форме загрузки файлов на своей странице, а не устанавливаете отдельное приложение.
Как мне добавить его в свой проект?Установите его через NPM, это позволит подключить jquery.fileupload.js и его расширения из node_modules. Затем инициализируйте виджет на стандартной HTML-форме загрузки файлов.
Что мне нужно, помимо самого плагина?Нужны jQuery версии 1.7+ и входящая в комплект фабрика виджетов jQuery UI версии 1.9+, а также включённый Iframe Transport для браузеров без XHR. Необязательные дополнения, такие как движок JS Templates и библиотека Load Image, позволяют показывать предпросмотр и уменьшать изображения на стороне клиента.
Проект всё ещё поддерживается?В README сказано, что проект поддерживается, но официального канала поддержки, кроме Stack Overflow, нет. Сам репозиторий на GitHub сейчас помечен как архивный.
Какие браузеры он на самом деле поддерживает?Он рассчитан на современные настольные браузеры (Chrome, Safari 4+, Firefox 3+, Opera 11+, IE6+) и мобильные браузеры (Chrome для iOS/Android 6.0+/4.0+, стандартный браузер Android 2.3+). Для старых браузеров без поддержки XHR он переходит на iframe.
Учитывает ли он вопросы безопасности при загрузке файлов?Да, в README есть ссылки на отдельные документы VULNERABILITIES и SECURITY, где перечислены исправленные уязвимости и объясняется, как безопасно настроить веб-сервер для загрузки файлов.
Можно ли загружать файлы на домен, отличный от домена самой страницы?Да, поддерживаются кросс-доменные загрузки через межсайтовые XHR-запросы или перенаправления iframe обратно на сервер исходного домена. Также есть входящий в комплект транспорт XDomainRequest для старых версий IE.
Какие серверные языки могут обрабатывать загруженные файлы?Подойдёт любая платформа, которая принимает стандартные загрузки файлов из HTML-форм, включая PHP, Python, Ruby on Rails, Java, Node.js и Go.
Может ли он уменьшать изображения перед загрузкой?Да, в браузерах с нужными JS API он может уменьшать изображения на стороне клиента и показывать предпросмотр изображений, аудио и видео до их отправки.
Creator
blueimp
Size
4.5 MB
Stars
30.7K
Updated
CommitSep 25
Age
15y
Commits · 90 Days