| 875 |
lars |
1 |
<!DOCTYPE HTML>
|
|
|
2 |
<!--
|
|
|
3 |
/*
|
|
|
4 |
* jQuery File Upload Plugin HTML Example 5.0.7
|
|
|
5 |
* https://github.com/blueimp/jQuery-File-Upload
|
|
|
6 |
*
|
|
|
7 |
* Copyright 2010, Sebastian Tschan
|
|
|
8 |
* https://blueimp.net
|
|
|
9 |
*
|
|
|
10 |
* Licensed under the MIT license:
|
|
|
11 |
* http://creativecommons.org/licenses/MIT/
|
|
|
12 |
*/
|
|
|
13 |
-->
|
|
|
14 |
<html lang="en" class="no-js">
|
|
|
15 |
<head>
|
|
|
16 |
<meta charset="utf-8">
|
|
|
17 |
<title>jQuery File Upload Example</title>
|
|
|
18 |
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" id="theme">
|
|
|
19 |
<link rel="stylesheet" href="../jquery.fileupload-ui.css">
|
|
|
20 |
<link rel="stylesheet" href="style.css">
|
|
|
21 |
</head>
|
|
|
22 |
<body>
|
|
|
23 |
<div id="fileupload">
|
|
|
24 |
<form action="upload.php" method="POST" enctype="multipart/form-data">
|
|
|
25 |
<div class="fileupload-buttonbar">
|
|
|
26 |
<label class="fileinput-button">
|
|
|
27 |
<span>Add files...</span>
|
|
|
28 |
<input type="file" name="files[]" multiple>
|
|
|
29 |
</label>
|
|
|
30 |
<button type="submit" class="start">Start upload</button>
|
|
|
31 |
<button type="reset" class="cancel">Cancel upload</button>
|
|
|
32 |
<button type="button" class="delete">Delete files</button>
|
|
|
33 |
</div>
|
|
|
34 |
</form>
|
|
|
35 |
<div class="fileupload-content">
|
|
|
36 |
<table class="files"></table>
|
|
|
37 |
<div class="fileupload-progressbar"></div>
|
|
|
38 |
</div>
|
|
|
39 |
</div>
|
|
|
40 |
<script id="template-upload" type="text/x-jquery-tmpl">
|
|
|
41 |
<tr class="template-upload{{if error}} ui-state-error{{/if}}">
|
|
|
42 |
<td class="preview"></td>
|
|
|
43 |
<td class="name">${name}</td>
|
|
|
44 |
<td class="size">${sizef}</td>
|
|
|
45 |
{{if error}}
|
|
|
46 |
<td class="error" colspan="2">Error:
|
|
|
47 |
{{if error === 'maxFileSize'}}File is too big
|
|
|
48 |
{{else error === 'minFileSize'}}File is too small
|
|
|
49 |
{{else error === 'acceptFileTypes'}}Filetype not allowed
|
|
|
50 |
{{else error === 'maxNumberOfFiles'}}Max number of files exceeded
|
|
|
51 |
{{else}}${error}
|
|
|
52 |
{{/if}}
|
|
|
53 |
</td>
|
|
|
54 |
{{else}}
|
|
|
55 |
<td class="progress"><div></div></td>
|
|
|
56 |
<td class="start"><button>Start</button></td>
|
|
|
57 |
{{/if}}
|
|
|
58 |
<td class="cancel"><button>Cancel</button></td>
|
|
|
59 |
</tr>
|
|
|
60 |
</script>
|
|
|
61 |
<script id="template-download" type="text/x-jquery-tmpl">
|
|
|
62 |
<tr class="template-download{{if error}} ui-state-error{{/if}}">
|
|
|
63 |
{{if error}}
|
|
|
64 |
<td></td>
|
|
|
65 |
<td class="name">${name}</td>
|
|
|
66 |
<td class="size">${sizef}</td>
|
|
|
67 |
<td class="error" colspan="2">Error:
|
|
|
68 |
{{if error === 1}}File exceeds upload_max_filesize (php.ini directive)
|
|
|
69 |
{{else error === 2}}File exceeds MAX_FILE_SIZE (HTML form directive)
|
|
|
70 |
{{else error === 3}}File was only partially uploaded
|
|
|
71 |
{{else error === 4}}No File was uploaded
|
|
|
72 |
{{else error === 5}}Missing a temporary folder
|
|
|
73 |
{{else error === 6}}Failed to write file to disk
|
|
|
74 |
{{else error === 7}}File upload stopped by extension
|
|
|
75 |
{{else error === 'maxFileSize'}}File is too big
|
|
|
76 |
{{else error === 'minFileSize'}}File is too small
|
|
|
77 |
{{else error === 'acceptFileTypes'}}Filetype not allowed
|
|
|
78 |
{{else error === 'maxNumberOfFiles'}}Max number of files exceeded
|
|
|
79 |
{{else error === 'uploadedBytes'}}Uploaded bytes exceed file size
|
|
|
80 |
{{else error === 'emptyResult'}}Empty file upload result
|
|
|
81 |
{{else}}${error}
|
|
|
82 |
{{/if}}
|
|
|
83 |
</td>
|
|
|
84 |
{{else}}
|
|
|
85 |
<td class="preview">
|
|
|
86 |
{{if thumbnail_url}}
|
|
|
87 |
<a href="${url}" target="_blank"><img src="${thumbnail_url}"></a>
|
|
|
88 |
{{/if}}
|
|
|
89 |
</td>
|
|
|
90 |
<td class="name">
|
|
|
91 |
<a href="${url}"{{if thumbnail_url}} target="_blank"{{/if}}>${name}</a>
|
|
|
92 |
</td>
|
|
|
93 |
<td class="size">${sizef}</td>
|
|
|
94 |
<td colspan="2"></td>
|
|
|
95 |
{{/if}}
|
|
|
96 |
<td class="delete">
|
|
|
97 |
<button data-type="${delete_type}" data-url="${delete_url}">Delete</button>
|
|
|
98 |
</td>
|
|
|
99 |
</tr>
|
|
|
100 |
</script>
|
|
|
101 |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
|
|
|
102 |
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
|
|
|
103 |
<script src="//ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>
|
|
|
104 |
<script src="../jquery.iframe-transport.js"></script>
|
|
|
105 |
<script src="../jquery.fileupload.js"></script>
|
|
|
106 |
<script src="../jquery.fileupload-ui.js"></script>
|
|
|
107 |
<script src="application.js"></script>
|
|
|
108 |
</body>
|
|
|
109 |
</html>
|