1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > jQuery Plugin to Magically Make File Inputs Upload Via Ajax</ title >
7
+ < meta name ="description " content ="jQuery.AjaxFileUpload.js by jfeldstein. jQuery plugin to magically make file inputs upload via ajax ">
8
+ < meta name ="author " content ="jfeldstein ">
9
+ < meta name ="robots " content ="index, follow ">
10
+ <!-- Canonical URL -->
11
+ < link rel ="canonical " href ="https://codehimblog.github.io/jquery-plugins/jquery-ajaxfileupload-js-by-jfeldstein.html ">
12
+ <!-- Favicon -->
13
+ < link rel ="icon " href ="/favicon.ico " type ="image/png ">
14
+ <!-- Bootstrap CSS -->
15
+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css " rel ="stylesheet ">
16
+ <!-- Bootstrap Icons -->
17
+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css " rel ="stylesheet ">
18
+ < link rel ="stylesheet " href ="/css/styles.css ">
19
+ </ head >
20
+ < body >
21
+ <!-- Navbar -->
22
+ < nav class ="navbar navbar-expand-lg navbar-dark bg-dark fixed-top ">
23
+ < div class ="container ">
24
+ < a class ="navbar-brand " href ="https://codehimblog.github.io ">
25
+ < i class ="bi bi-box-seam me-2 "> </ i > CodehimBlog
26
+ </ a >
27
+ < button class ="navbar-toggler " type ="button " data-bs-toggle ="collapse " data-bs-target ="#navbarNav " aria-controls ="navbarNav " aria-expanded ="false " aria-label ="Toggle navigation ">
28
+ < span class ="navbar-toggler-icon "> </ span >
29
+ </ button >
30
+ < div class ="collapse navbar-collapse " id ="navbarNav ">
31
+ < ul class ="navbar-nav ms-auto ">
32
+ < li class ="nav-item ">
33
+ < a class ="nav-link " href ="https://codehimblog.github.io/ "> < i class ="bi bi-house-door me-1 "> </ i > Home</ a >
34
+ </ li >
35
+ < li class ="nav-item ">
36
+ < a class ="nav-link " href ="https://codehimblog.github.io/projects/ "> < i class ="bi bi-box me-1 "> </ i > Projects</ a >
37
+ </ li >
38
+ < li class ="nav-item ">
39
+ < a class ="nav-link " href ="https://codehimblog.github.io/about.html "> < i class ="bi bi-book me-1 "> </ i > About</ a >
40
+ </ li >
41
+ < li class ="nav-item ">
42
+ < a class ="nav-link " href ="https://codehimblog.github.io/contact.html "> < i class ="bi bi-envelope me-1 "> </ i > Contact</ a >
43
+ </ li >
44
+ </ ul >
45
+ </ div >
46
+ </ div >
47
+ </ nav >
48
+
49
+ <!-- Breadcrumbs -->
50
+ < div class ="container mt-4 breadcrumbs ">
51
+ < nav aria-label ="breadcrumb ">
52
+ < ol class ="breadcrumb mb-0 ">
53
+ < li class ="breadcrumb-item "> < a href ="https://codehimblog.github.io/ "> Home</ a > </ li >
54
+ < li class ="breadcrumb-item "> < a href ="https://codehimblog.github.io/jquery-plugins/ "> jQuery Plugins</ a > </ li >
55
+ < li class ="breadcrumb-item active " aria-current ="page "> Jquery.ajaxfileupload.js</ li >
56
+ </ ol >
57
+ </ nav >
58
+ </ div >
59
+
60
+ <!-- Schema Markup for Breadcrumbs -->
61
+ < script type ="application/ld+json ">
62
+ {
63
+ "@context" : "https://schema.org" ,
64
+ "@type" : "BreadcrumbList" ,
65
+ "itemListElement" : [
66
+ {
67
+ "@type" : "ListItem" ,
68
+ "position" : 1 ,
69
+ "name" : "Home" ,
70
+ "item" : "https://codehimblog.github.io/"
71
+ } ,
72
+ {
73
+ "@type" : "ListItem" ,
74
+ "position" : 2 ,
75
+ "name" : "jQuery Plugins" ,
76
+ "item" : "https://codehimblog.github.io/jquery-plugins/"
77
+ } ,
78
+ {
79
+ "@type" : "ListItem" ,
80
+ "position" : 3 ,
81
+ "name" : "Jquery.ajaxfileupload.js" ,
82
+ "item" : "https://codehimblog.github.io/projects/{{packageSlug}}"
83
+ }
84
+ ]
85
+ }
86
+ </ script >
87
+ <!-- Main Content -->
88
+ < div class ="container mt-3 ">
89
+ < div class ="row ">
90
+ <!-- Main Details -->
91
+ < main class ="col-md-8 site-main p-0 ">
92
+ < article >
93
+ <!-- Project Name & Description -->
94
+ < h1 id ="packageName "> Jquery.ajaxfileupload.js</ h1 >
95
+ < p id ="packageDescription " class ="text-muted "> jQuery plugin to magically make file inputs upload via ajax</ p >
96
+
97
+
98
+
99
+ <!-- Statistics -->
100
+ < div class ="stat-row d-flex justify-content-around align-items-center text-center mb-2 ">
101
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
102
+ < i class ="bi bi-star-fill text-warning mb-2 "> </ i >
103
+ < div >
104
+ < span id ="stargazersCount " class ="stat-value "> 408</ span >
105
+ < p class ="stat-label mb-0 "> Stars</ p >
106
+ </ div >
107
+ </ div >
108
+
109
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
110
+ < i class ="bi bi-box-arrow-in-down mb-2 "> </ i >
111
+ < div >
112
+ < span id ="repoSize " class ="stat-value "> 0.03 MB</ span >
113
+ < p class ="stat-label mb-0 "> Size</ p >
114
+ </ div >
115
+ </ div >
116
+
117
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
118
+ < i class ="bi bi-arrow-repeat text-secondary mb-2 "> </ i >
119
+ < div >
120
+ < span id ="forksCount " class ="stat-value "> 246</ span >
121
+ < p class ="stat-label mb-0 "> Forks</ p >
122
+ </ div >
123
+ </ div >
124
+
125
+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
126
+ < i class ="bi bi-exclamation-circle text-danger mb-2 "> </ i >
127
+ < div >
128
+ < span id ="openIssuesCount " class ="stat-value "> 28</ span >
129
+ < p class ="stat-label mb-0 "> Open Issues</ p >
130
+ </ div >
131
+ </ div >
132
+ </ div >
133
+
134
+
135
+ < div class ="ad-unit ad-apt ">
136
+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
137
+ crossorigin ="anonymous "> </ script >
138
+ <!-- CodehimBlog APT -->
139
+ < ins class ="adsbygoogle "
140
+ style ="display:block "
141
+ data-ad-client ="ca-pub-7089100907045419 "
142
+ data-ad-slot ="4990741913 "
143
+ data-ad-format ="auto "
144
+ data-full-width-responsive ="true "> </ ins >
145
+ < script >
146
+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
147
+ </ script >
148
+ </ div >
149
+
150
+ < div class ="row mb-4 ">
151
+ <!-- Tabs (Left) -->
152
+ < div class ="col-12 col-md-6 d-flex justify-content-start mb-3 mb-md-0 ">
153
+ < ul class ="nav nav-tabs " id ="infoTabs " role ="tablist ">
154
+ < li class ="nav-item " role ="presentation ">
155
+ < button class ="nav-link active " id ="installation-tab " data-bs-toggle ="tab " data-bs-target ="#installation " type ="button " role ="tab " aria-controls ="installation " aria-selected ="true ">
156
+ < i class ="bi bi-file-earmark-text "> </ i > Readme
157
+ </ button >
158
+ </ li >
159
+ < li class ="nav-item " role ="presentation ">
160
+ < button class ="nav-link " id ="changelog-tab " data-bs-toggle ="tab " data-bs-target ="#changelog " type ="button " role ="tab " aria-controls ="changelog " aria-selected ="false ">
161
+ < i class ="bi bi-journal-text me-2 "> </ i > Changelog
162
+ </ button >
163
+ </ li >
164
+ </ ul >
165
+ </ div >
166
+
167
+ <!-- Action Buttons (Right) -->
168
+ < div class ="col-12 col-md-6 d-flex align-items-center justify-content-end ">
169
+ < a href ="https://github.com/jfeldstein/jQuery.AjaxFileUpload.js/archive/refs/heads/master.zip " class ="btn btn-primary me-2 action-btn " id ="downloadBtn ">
170
+ < i class ="bi bi-cloud-download me-2 "> </ i > Download ZIP
171
+ </ a >
172
+ < a href ="https://github.com/jfeldstein/jQuery.AjaxFileUpload.js " target ="_blank " class ="btn btn-outline-secondary action-btn " id ="githubBtn ">
173
+ < i class ="bi bi-github me-2 "> </ i > Fork on GitHub
174
+ </ a >
175
+ </ div >
176
+ </ div >
177
+ < div class ="tab-content mt-3 " id ="infoTabsContent ">
178
+ < div class ="tab-pane fade show active " id ="installation " role ="tabpanel " aria-labelledby ="installation-tab ">
179
+ < p > This plugin uploads the file somehwere, and passes the< br />
180
+ response to a callback, nothing else. </ p >
181
+ < ul >
182
+ < li > It does not depend on specific HTML, just give it a < code > <input type="file"></ code > </ li >
183
+ < li > It does not require your server to respond in any particular way</ li >
184
+ < li > It does not matter how many files you use, or where they are on the page</ li >
185
+ </ ul >
186
+ < p > < strong > Simple HTML</ strong > </ p >
187
+ < pre > < code > <input type="file" id="one-specific-file" name="one-specific-file"></ code > </ pre >
188
+ < p > < strong > Use as little as</ strong > </ p >
189
+ < pre > < code > $('#one-specific-file').ajaxfileupload({
190
+ action: '/upload.php'
191
+ });</ code > </ pre >
192
+ < p > < strong > or as much as</ strong > </ p >
193
+ < pre > < code > $('input[type="file"]').ajaxfileupload({
194
+ action: '/upload.php',
195
+ valid_extensions : ['md','csv'],
196
+ params: {
197
+ extra: 'info'
198
+ },
199
+ onComplete: function(response) {
200
+ console.log('custom handler for file:');
201
+ alert(JSON.stringify(response));
202
+ },
203
+ onStart: function() {
204
+ if(weWantedTo) return false; // cancels upload
205
+ },
206
+ onCancel: function() {
207
+ console.log('no file selected');
208
+ }
209
+ });</ code > </ pre >
210
+ < p > Copyright (c) 2011 Jordan Feldstein</ p >
211
+ < p > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</ p >
212
+ < p > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</ p >
213
+ < p > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</ p >
214
+ </ div >
215
+
216
+ < div class ="tab-pane fade " id ="changelog " role ="tabpanel " aria-labelledby ="changelog-tab ">
217
+ < ul id ="changelogList ">
218
+ No changelog available.
219
+ </ ul >
220
+ </ div >
221
+
222
+ </ div >
223
+
224
+ < div class ="tags mb-2 mt-2 ">
225
+
226
+ </ div >
227
+
228
+ </ article >
229
+
230
+
231
+ </ main >
232
+ <!-- Sidebar -->
233
+ < aside class ="col-md-4 p-0 ">
234
+ < div class ="sidebar ">
235
+ <!-- Owner Section -->
236
+ < div class ="sidebar-item mb-4 ">
237
+ < div class ="ad-unit ">
238
+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
239
+ crossorigin ="anonymous "> </ script >
240
+ <!-- CodehimBlog Sidebar -->
241
+ < ins class ="adsbygoogle "
242
+ style ="display:block "
243
+ data-ad-client ="ca-pub-7089100907045419 "
244
+ data-ad-slot ="8929986923 "
245
+ data-ad-format ="auto "
246
+ data-full-width-responsive ="true "> </ ins >
247
+ < script >
248
+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
249
+ </ script >
250
+ </ div >
251
+ < div class ="d-flex align-items-center ">
252
+ < img src ="https://avatars.githubusercontent.com/u/172683?v=4 " alt ="Owner Avatar " class ="rounded-circle me-2 owner-avatar ">
253
+ < a href ="https://github.com/jfeldstein " target ="_blank " id ="ownerName " class ="sidebar-link "> jfeldstein</ a >
254
+ </ div >
255
+ </ div >
256
+
257
+ <!-- Metadata Section -->
258
+ < div class ="sidebar-item mb-2 ">
259
+ < div class ="metadata-item d-flex align-items-center ">
260
+ < i class ="bi bi-calendar me-2 "> </ i >
261
+ < strong > Created At:</ strong >
262
+ < span id ="createdAt " class ="ms-1 "> January 29, 2011</ span >
263
+ </ div >
264
+ < div class ="metadata-item d-flex align-items-center mt-2 ">
265
+ < i class ="bi bi-pencil-square me-2 "> </ i >
266
+ < strong > Last Updated:</ strong >
267
+ < span id ="updatedAt " class ="ms-1 "> November 13, 2024</ span >
268
+ </ div >
269
+ < div class ="metadata-item d-flex align-items-center mt-2 ">
270
+ < i class ="bi bi-file-earmark-code me-2 "> </ i >
271
+ < strong > Language:</ strong >
272
+ < span id ="language " class ="ms-1 "> JavaScript</ span >
273
+ </ div >
274
+
275
+ < div class ="metadata-item d-flex align-items-center mt-2 ">
276
+ < i class ="bi bi-shield-check "> </ i >
277
+ < strong > License:</ strong >
278
+ < span id ="license " class ="ms-1 "> Unknown</ span >
279
+ </ div >
280
+ < a href ="# " target ="_blank " class ="btn btn-outline-dark btn-sm " id ="homepageBtn ">
281
+ < i class ="bi bi-house-door me-2 "> </ i > Visit Homepage
282
+ </ a >
283
+
284
+ </ div >
285
+
286
+ < div class ="sidebar-item mb-2 ">
287
+ < li > No dependencies!</ li >
288
+ </ div >
289
+
290
+ < div class ="sidebar-item ">
291
+ < h5 class ="sidebar-title "> Contributors</ h5 >
292
+ < ul class ="p-0 " id ="contributorsList ">
293
+ < ul class ="list-group list-group-flush " id ="contributorsList "> < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/172683?v=4 " alt ="jfeldstein " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/jfeldstein " target ="_blank " class ="text-decoration-none fw-bold "> jfeldstein</ a > < p class ="mb-0 text-muted small "> 9 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/742288?v=4 " alt ="z-aliakseyeu " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/z-aliakseyeu " target ="_blank " class ="text-decoration-none fw-bold "> z-aliakseyeu</ a > < p class ="mb-0 text-muted small "> 2 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/673912?v=4 " alt ="spiechu " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/spiechu " target ="_blank " class ="text-decoration-none fw-bold "> spiechu</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/2623668?v=4 " alt ="gschorkopf " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/gschorkopf " target ="_blank " class ="text-decoration-none fw-bold "> gschorkopf</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/8406884?v=4 " alt ="jackd0ng " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/jackd0ng " target ="_blank " class ="text-decoration-none fw-bold "> jackd0ng</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item d-none "> < img src ="https://avatars.githubusercontent.com/u/214054?v=4 " alt ="rjregenold " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/rjregenold " target ="_blank " class ="text-decoration-none fw-bold "> rjregenold</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item d-none "> < img src ="https://avatars.githubusercontent.com/u/3118036?v=4 " alt ="r-barnes " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/r-barnes " target ="_blank " class ="text-decoration-none fw-bold "> r-barnes</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item d-none "> < img src ="https://avatars.githubusercontent.com/u/2330911?v=4 " alt ="mylxsw " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/mylxsw " target ="_blank " class ="text-decoration-none fw-bold "> mylxsw</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > < li class ="list-group-item text-center "> < a href ="# " id ="toggleContributors " class ="d-block "> +3 more Contributors</ a > </ li > </ ul >
294
+ </ ul >
295
+
296
+ </ div >
297
+
298
+ < div class ="ad-unit ">
299
+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
300
+ crossorigin ="anonymous "> </ script >
301
+ <!-- CodehimBlog Skyscrapper -->
302
+ < ins class ="adsbygoogle "
303
+ style ="display:block "
304
+ data-ad-client ="ca-pub-7089100907045419 "
305
+ data-ad-slot ="7469565592 "
306
+ data-ad-format ="auto "
307
+ data-full-width-responsive ="true "> </ ins >
308
+ < script >
309
+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
310
+ </ script >
311
+ </ div >
312
+
313
+ </ div >
314
+ </ aside >
315
+ </ div >
316
+ </ div >
317
+ <!-- Footer -->
318
+ < footer class ="bg-dark text-white text-center py-3 page-footer ">
319
+ < div class ="container ">
320
+ < p class ="mb-2 "> © 2024 CodehimBlog - Powered by GitHub</ p >
321
+ < nav >
322
+ < ul class ="list-inline mb-0 ">
323
+ < li class ="list-inline-item ">
324
+ < a href ="/privacy-policy.html " class ="footer-link "> Privacy Policy</ a >
325
+ </ li >
326
+ < li class ="list-inline-item ">
327
+ < span class ="text-white "> |</ span >
328
+ </ li >
329
+ < li class ="list-inline-item ">
330
+ < a href ="/terms-and-conditions.html " class ="footer-link "> Terms and Conditions</ a >
331
+ </ li >
332
+ </ ul >
333
+ </ nav >
334
+ </ div >
335
+ </ footer >
336
+ <!-- Bootstrap Bundle JS -->
337
+ < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js "> </ script >
338
+ < script src ="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js "> </ script >
339
+ < script src ="/js/script.js "> </ script >
340
+ <!-- Google tag (gtag.js) -->
341
+ < script async src ="https://www.googletagmanager.com/gtag/js?id=G-FG2ZX76XGT "> </ script >
342
+ < script >
343
+ window . dataLayer = window . dataLayer || [ ] ;
344
+ function gtag ( ) { dataLayer . push ( arguments ) ; }
345
+ gtag ( 'js' , new Date ( ) ) ;
346
+
347
+ gtag ( 'config' , 'G-FG2ZX76XGT' ) ;
348
+ </ script >
349
+ </ body >
350
+ </ html >
0 commit comments