npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery-multifile

v2.2.2

Published

jQuery Multiple File Selection Plugin

Downloads

615

Readme

jQuery Multiple File Upload

Overview

Flattr this git repo

MultiFile ($.MultiFile) is a non-obtrusive and crucially non-opinionated plugin for jQuery that helps your users easily select multiple files for upload.

It helps you implement a basic interface to improve the file selection experience of your users whilst providing you, the developer, with 3 simple methods of validation: accepted extensions, maximum number of files and total size.


Server-Side Implementation

This plugin will never deal with the server-side implementation of your upload solution. This plugin will not upload your files. If that's what you want, we recommend you check them out one of the many, many many great tools out there which provide a full solution - with image previews, progress bars and extensive support for many environments (.NET, PHP, Java, etc...).

And remember..... server-side validation is always required.


Installation

First, get the package

Install with bower: bower install multifile or download zip from GitHub multifile.zip

Then, invoke the required javascript files to your document, just before the </html> tag.

Add jQuery to your page. We strongly recommend you make use of Google's Hosted Libraries service.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

Then add the plugin (after jQuery)

<script src="/path/to/plugin/jquery.MultiFile.min.js"></script>

Note that, before v2.2.2, the file was called jQuery.MultiFile.min.js instead (jQuery recommended to use a lowercase ‘q’ in package names).


Recommended Usage (HTML5)

Just add multiple="multiple" and class="multi" attributes to your <input type="file"/>, like this:

<input type="file" multiple="multiple" class="multi"/>

Use the maxlength property if you want to limit the number of files selected. Server-side validation is always required

<input type="file" multiple="multiple" class="multi" maxlength="2"/>

Use the accept if you only want files of a certain extension to be selected Separate valid extensions with a "|", like this: "jpg|gif|png". Server-side validation is always required.

<input type="file" multiple="multiple" class="multi" accept="gif|jpg"/>

Legacy Usage (pre HTML5)

Versions of HTML and xHTML prior to HTML 5 do not support the multiple="multiple" attribute. The plugin will still work in almost the same way, but your users will only be able to one file at a time.

<input type="file" class="multi"/>

Use the maxlength property if you want to limit the number of files selected. Server-side validation is always required

<input type="file" class="multi" maxlength="2"/>

Use the accept if you only want files of a certain extension to be selected Separate valid extensions with a "|", like this: "jpg|gif|png". Server-side validation is always required.

<input type="file" class="multi" accept="gif|jpg"/>

Full Documentation and Demos

For more examples, documentation and a full list of features available, please visit the plugin's official website.


Continous Integration with Travis CI

Master Status: full build history on Travis CI