index.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Uppy :tl: playground</title>
  7. </head>
  8. <body>
  9. <style>
  10. html {
  11. background: #f1f1f1;
  12. }
  13. main {
  14. padding: 20px;
  15. font: 12pt sans-serif;
  16. background: white;
  17. width: 800px;
  18. margin: auto;
  19. }
  20. hr {
  21. border: 0;
  22. background-color: #111e33;
  23. height: 1px;
  24. }
  25. .hidden { display: none; }
  26. .error { color: red; }
  27. #logo { height: 1em; vertical-align: middle; }
  28. </style>
  29. <main>
  30. <h1>Uppy <img src="https://transloadit.edgly.net/assets/images/logo-small.svg" alt="Transloadit" id="logo"> playground</h1>
  31. <hr>
  32. <h2>transloadit.form()</h2>
  33. <form id="test-form" method="post" action="http://localhost:9967/test">
  34. <p><strong>leave a message</strong>
  35. <p>
  36. <label>name:
  37. <input type="text" name="name">
  38. </label>
  39. <p>
  40. <label>message: <br>
  41. <textarea name="message"></textarea>
  42. </label>
  43. <p>
  44. <label>
  45. attachments:
  46. <input type="file" name="files" multiple>
  47. </label>
  48. <div class="progress"></div>
  49. <p>
  50. <button type="submit">
  51. Upload
  52. </button>
  53. <span class="error"></span>
  54. </form>
  55. <hr>
  56. <h2>transloadit.form() with dashboard</h2>
  57. <form id="dashboard-form" method="post" action="http://localhost:9967/test">
  58. <p><strong>leave a message</strong>
  59. <p>
  60. <label>name:
  61. <input type="text" name="name">
  62. </label>
  63. <p>
  64. <label>message: <br>
  65. <textarea name="message"></textarea>
  66. </label>
  67. <p>
  68. <label>
  69. attachments:
  70. <span class="dashboard"></span>
  71. </label>
  72. <p>
  73. <button type="submit">
  74. Upload
  75. </button>
  76. <span class="error"></span>
  77. </form>
  78. <hr>
  79. <h2>transloadit.pick()</h2>
  80. <p>
  81. <button onclick="openModal()">Open</button>
  82. <hr>
  83. <h2>transloadit.upload()</h2>
  84. <p>
  85. An &lt;input type=file&gt; backed by `transloadit.upload`:
  86. <p>
  87. <input type="file" multiple onchange="doUpload(event)">
  88. <p id="upload-result">
  89. <p id="upload-error" class="error">
  90. </main>
  91. <link href="uppy.min.css" rel="stylesheet">
  92. <script src="bundle.js"></script>
  93. </body>
  94. </html>