File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< script src ="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js " type ="text/javascript "> </ script >
5
- < script src ="http://jquery-html5-upload.googlecode.com/svn/trunk/ jquery.html5_upload.js " type ="text/javascript "> </ script >
5
+ < script src ="jquery.html5_upload.js " type ="text/javascript "> </ script >
6
6
< meta content ="text/html; charset=utf-8 " http-equiv ="Content-Type " />
7
7
</ head >
8
8
< body >
17
17
< script type ="text/javascript ">
18
18
$ ( function ( ) {
19
19
$ ( "#upload_field" ) . html5_upload ( {
20
- url : function ( ) {
21
- return prompt ( "Url ", "/" ) ;
20
+ url : function ( number ) {
21
+ return prompt ( number + " url ", "/" ) ;
22
22
} ,
23
23
sendBoundary : window . FormData || $ . browser . mozilla ,
24
24
onStart : function ( event , total ) {
Original file line number Diff line number Diff line change 25
25
stopOnFirstError : false ,
26
26
sendBoundary : false ,
27
27
fieldName : 'user_file[]' , //ignore if sendBoundary is false
28
+ method : 'post' ,
28
29
29
30
STATUSES : {
30
31
'STARTED' : 'Запуск' ,
115
116
upload_file ( number + 1 ) ;
116
117
}
117
118
} ;
118
- xhr . open ( "post" , typeof ( options . url ) == "function" ? options . url ( ) : options . url , true ) ;
119
+ xhr . open ( options . method , typeof ( options . url ) == "function" ? options . url ( number ) : options . url , true ) ;
119
120
xhr . setRequestHeader ( "Cache-Control" , "no-cache" ) ;
120
121
xhr . setRequestHeader ( "X-Requested-With" , "XMLHttpRequest" ) ;
121
122
xhr . setRequestHeader ( "X-File-Name" , file . fileName ) ;
You can’t perform that action at this time.
0 commit comments