You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin was created to duplicate the functionality of GMail's drag-and-drop attachment support. Once your dropzone is defined, simply drag your file(s) to that area and watch the plugin do its magic.
10
+
11
+
##Usage
12
+
13
+
$('selector').filedrop({
14
+
url: 'upload.php',
15
+
error: function(err, file) {
16
+
switch(err) {
17
+
case 'BrowserNotSupported':
18
+
alert("Sorry! Your browser doesn't support drag and drop.");
19
+
break;
20
+
case 'TooManyFiles':
21
+
alert("Sorry! You're trying to upload too many files at once.");
var percent = Math.round(100*((bytesLoaded+CatalogManager.completedBytes)/CatalogManager.totalBytes));
43
+
44
+
if(percent >= 100) {
45
+
percent = 100;
46
+
setTimeout("$('#processing').html('Processing... this may take a minute.').fadeIn();", 2000);
47
+
}
48
+
49
+
return percent;
50
+
},
51
+
afterAll: function() {
52
+
// Often times people will have a progress bar which is set to 100% here
53
+
}
54
+
});
55
+
56
+
##Development Team / Contact Info
57
+
58
+
* Josh Sullivan - Lead Developer ([https://github.com/jpsullivan](https://github.com/jpsullivan))
59
+
60
+
##Requirements
61
+
62
+
This plugin has two dependencies, which should most likely be used in your webapp regardless.
63
+
64
+
* jQuery 1.4.4+
65
+
* Modernizr
66
+
67
+
##Roadmap
68
+
69
+
This plugin will eventually be expanded on to show some demo's, tips, and legacy (fallback) support for browsers that do not yet support features such as drag-and-drop (I'm looking at your IE..)
0 commit comments