123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <html>
- <head>
- <link rel="stylesheet" href="css/spinkit-loader.css" type="text/css" />
- </head>
- <body>
- <form id="data-upload" enctype="multipart/form-data">
- <input name="dir" id="dir-input" type="file" webkitdirectory directory multiple/><br/>
- <input type="button" onclick="uploadAwsFiles()" value="Upload"/>
- </form>
- <div id="dir-info"></div>
- <div id="file-info"></div>
- <p>
- <span id="progress-number">0</span> files remaining</p>
- <div id="upload-console"></div>
- <div id="error-messages"></div>
- <script type="text/javascript" src="/js/ajax.js"></script>
- <script type="text/javascript" src="/js/resumefilemanager.js"></script>
- <script type="text/javascript">
- function readableFileSize(rawsize) {
- var readable = "";
- if (rawsize > 1024 * 1024 * 1024) {
- readable = (Math.round(rawsize * 100 / (1024 * 1024 * 1024)) / 100).toString() + ' GB';
- } else if (rawsize > 1024 * 1024) {
- readable = (Math.round(rawsize * 100 / (1024 * 1024)) / 100).toString() + ' MB';
- } else if (rawsize > 1024) {
- readable = (Math.round(rawsize * 100 / 1024) / 100).toString() + ' KB';
- } else {
- readable = rawsize + ' bytes';
- }
- return readable;
- }
- function uploadAwsFiles() {
- fileManager.resumeUpload(2);
- }
- document.addEventListener("DOMContentLoaded", function(event) {
- document.getElementById("dir-input").addEventListener('change', function(event) {
- fileManager.process();
- });
- });
- </script>
- </body>
- </html>
|