-
Notifications
You must be signed in to change notification settings - Fork 263
/
w_uploadify.html
97 lines (84 loc) · 4.49 KB
/
w_uploadify.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<h2 class="contentTitle">uploadify多文件上传</h2>
<style type="text/css" media="screen">
.my-uploadify-button {
background:none;
border: none;
text-shadow: none;
border-radius:0;
}
.uploadify:hover .my-uploadify-button {
background:none;
border: none;
}
.fileQueue {
width: 400px;
height: 150px;
overflow: auto;
border: 1px solid #E5E5E5;
margin-bottom: 10px;
}
</style>
<div class="pageContent" style="margin: 0 10px" layoutH="50">
<input id="testFileInput" type="file" name="image"
uploaderOption="{
swf:'uploadify/scripts/uploadify.swf',
uploader:'demo/common/ajaxDone.json',
formData:{PHPSESSID:'xxx', ajax:1},
buttonText:'请选择文件',
fileSizeLimit:'200KB',
fileTypeDesc:'*.jpg;*.jpeg;*.gif;*.png;',
fileTypeExts:'*.jpg;*.jpeg;*.gif;*.png;',
auto:true,
multi:true,
onUploadSuccess:uploadifySuccess,
onQueueComplete:uploadifyQueueComplete
}"
/>
<div class="divider"></div>
<input id="testFileInput2" type="file" name="image2"
uploaderOption="{
swf:'uploadify/scripts/uploadify.swf',
uploader:'demo/common/ajaxDone.json',
formData:{PHPSESSID:'xxx', ajax:1},
queueID:'fileQueue',
buttonImage:'uploadify/img/add.jpg',
buttonClass:'my-uploadify-button',
width:102,
auto:false
}"
/>
<div id="fileQueue" class="fileQueue"></div>
<input type="image" src="uploadify/img/upload.jpg" onclick="$('#testFileInput2').uploadify('upload', '*');"/>
<input type="image" src="uploadify/img/cancel.jpg" onclick="$('#testFileInput2').uploadify('cancel', '*');"/>
<div class="divider"></div>
<p style="margin:10px"><a href="http://www.uploadify.com/documentation/" target="_blank">Uploadify 在线文档</a></p>
<textarea cols="160" rows="10">
uploaderOption: http://www.uploadify.com/documentation/
auto : true, // Automatically upload files when added to the queue
buttonClass : '', // A class name to add to the browse button DOM object
buttonCursor : 'hand', // The cursor to use with the browse button
buttonImage : null, // (String or null) The path to an image to use for the Flash browse button if not using CSS to style the button
buttonText : 'SELECT FILES', // The text to use for the browse button
checkExisting : false, // The path to a server-side script that checks for existing files on the server
debug : false, // Turn on swfUpload debugging mode
fileObjName : 'Filedata', // The name of the file object to use in your server-side script
fileSizeLimit : 0, // The maximum size of an uploadable file in KB (Accepts units B KB MB GB if string, 0 for no limit)
fileTypeDesc : 'All Files', // The description for file types in the browse dialog
fileTypeExts : '*.*', // Allowed extensions in the browse dialog (server-side validation should also be used)
height : 30, // The height of the browse button
itemTemplate : false, // The template for the file item in the queue
method : 'post', // The method to use when sending files to the server-side upload script
multi : true, // Allow multiple file selection in the browse dialog
formData : {}, // An object with additional data to send to the server-side upload script with every file upload
preventCaching : true, // Adds a random value to the Flash URL to prevent caching of it (conflicts with existing parameters)
progressData : 'percentage', // ('percentage' or 'speed') Data to show in the queue item during a file upload
queueID : false, // The ID of the DOM object to use as a file queue (without the #)
queueSizeLimit : 999, // The maximum number of files that can be in the queue at one time
removeCompleted : true, // Remove queue items from the queue when they are done uploading
removeTimeout : 3, // The delay in seconds before removing a queue item if removeCompleted is set to true
requeueErrors : false, // Keep errored files in the queue and keep trying to upload them
successTimeout : 30, // The number of seconds to wait for Flash to detect the server's response after the file has finished uploading
uploadLimit : 0, // The maximum number of files you can upload
width : 120, // The width of the browse button
</textarea>
</div>