File tree Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * jQuery File Upload Plugin JS Example 4.3.1
2
+ * jQuery File Upload Plugin JS Example 4.3.2
3
3
* https://github.com/blueimp/jQuery-File-Upload
4
4
*
5
5
* Copyright 2010, Sebastian Tschan
13
13
14
14
$ ( function ( ) {
15
15
$ ( '#file_upload' ) . fileUploadUIX ( {
16
+ // The url to the upload handler script (required):
16
17
url : 'upload.php' ,
18
+ // The url path to the uploaded files directory (required):
17
19
uploadDir : 'files/' ,
20
+ // The url path to the thumbnail pictures directory (required):
18
21
thumbnailsDir : 'thumbnails/' ,
22
+ // Wait for user interaction before starting uploads:
19
23
autoUpload : false ,
24
+ // Blob size setting for chunked uploads (remove or set to null to disable):
20
25
maxChunkSize : 10000000 ,
21
- continueAbortedUploads : true
26
+ // Request uploaded filesize prior upload and upload remaining bytes:
27
+ continueAbortedUploads : true ,
28
+ // Open download dialogs via iframes, to prevent aborting current uploads:
29
+ forceIframeDownload : true
22
30
} ) ;
23
31
} ) ;
Original file line number Diff line number Diff line change 49
49
this . uploadDir = this . thumbnailsDir = null ;
50
50
this . autoUpload = true ;
51
51
this . continueAbortedUploads = false ;
52
+ this . forceIframeDownload = false ;
52
53
this . dropZone = container . find ( 'form:first' ) ;
53
54
this . uploadTable = container . find ( '.files:first' ) ;
54
55
this . downloadTable = this . uploadTable ;
179
180
} ;
180
181
181
182
this . initDownloadHandler = function ( ) {
182
- // Open download dialogs via iframes, to prevent aborting current uploads:
183
- uploadHandler . downloadTable . find ( 'a:not([target="_blank"])' )
184
- . live ( 'click' , function ( ) {
185
- $ ( '<iframe style="display:none;"/>' )
186
- . attr ( 'src' , this . href )
187
- . appendTo ( container ) ;
188
- return false ;
189
- } ) ;
183
+ if ( uploadHandler . forceIframeDownload ) {
184
+ // Open download dialogs via iframes, to prevent aborting current uploads:
185
+ uploadHandler . downloadTable . find ( 'a:not([target="_blank"])' )
186
+ . live ( 'click' , function ( e ) {
187
+ $ ( '<iframe style="display:none;"/>' )
188
+ . attr ( 'src' , this . href )
189
+ . appendTo ( container ) ;
190
+ e . preventDefault ( ) ;
191
+ } ) ;
192
+ }
190
193
} ;
191
194
192
195
this . initDeleteHandler = function ( ) {
You can’t perform that action at this time.
0 commit comments