gitmyhub

plupload

JavaScript ★ 5.6k updated 1y ago

Plupload is JavaScript API for building file uploaders. It supports multiple file selection, file filtering, chunked upload, client side image downsizing and when necessary can fallback to alternative runtimes, like Flash and Silverlight.

A JavaScript library for adding file uploads to websites, with support for chunked uploads, image resizing in the browser, and upload progress tracking.

JavaScriptNode.jssetup: moderatecomplexity 2/5

Plupload is a JavaScript library for adding file uploads to websites and web applications. It gives developers a programming interface for handling the full upload process, from selecting files on a user's computer to sending them to a server. Developers who need flexible, reliable file uploads use it as the foundation for building their own upload interfaces.

The library was originally created because web browsers had very limited built-in upload support. The standard HTML file input was visually inflexible and offered no progress indicators. Plupload filled that gap by providing a consistent API, including fallbacks for older environments using Flash or Silverlight, so the same code could run across different browsers and years of browser versions.

Plupload has three main parts. The low-level layer, called mOxie, handles browser differences under the hood and acts as a compatibility shim. On top of that sits the Plupload API itself, which controls how files are selected, filtered, and sent. Two ready-made interface widgets, one for a drag-and-drop panel and one for a queue view, come bundled with the release as examples of what the API can produce.

Beyond basic file selection, the library supports sending large files in smaller pieces (called chunking) so that interrupted uploads can resume without starting over. It can also shrink images inside the browser before sending them, reducing upload sizes without extra server work. Uploads to Amazon S3 are covered in its documentation as a standard use case.

The project is licensed under AGPL. Code contributions are welcome through GitHub, though contributed code becomes AGPL-licensed and copyright transfers to Moxiecode Systems AB. The library is built using Node.js tooling, and the source includes a submodule for the mOxie layer, so cloning it recursively is the recommended setup step.

Where it fits