cotopaxi
cotopaxi

Reputation: 927

Facebook-style multiple image upload

Facebook has the ability to select multiple images in the file browser in its upload feature.

Can anyone explain how this is achieved?

I'd like to do something similar in jquery without the use of a flash widget.

Upvotes: 4

Views: 7070

Answers (3)

Gabriel Mazetto
Gabriel Mazetto

Reputation: 1130

Instructions on how to include jQuery File Upload with Rails setup https://github.com/blueimp/jQuery-File-Upload/wiki/Rails-setup-for-V5/35cca0e5e21b5c8fb29b89e9675314907ac1a464

(note: this question was originally answered 3 years ago, the above link may have inaccurate instructions for recent versions of the referred gems/libraries, but may be easy for someone to follow and fix whatever have changed).

Upvotes: -1

Uwe Keim
Uwe Keim

Reputation: 40726

The HTML5 File API enables you to do it natively. Basically you add the multiple="multiple" attribute to the file upload control:

<input multiple="multiple" type="file" ... />

Disadvantage: Only runs in modern browsers like Firefox, Chrome, Safari. IE, even version 9 does not support this multiple upload.

Otherwise, you have to rely on some Flash or Java upload component.

(Edit: Changed to multiple="multiple", thanks to Ms2ger)

Upvotes: 7

Email
Email

Reputation: 2425

The best and easiest jQuery-based multiupload scripts (IMHO):

http://www.uploadify.com/
http://www.uploadify.com/demos/

free and open source

Upvotes: 0

Related Questions