index.html 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <!doctype html>
  2. <title>Upload new File</title>
  3. {% if name %}
  4. <h1>on chaturbate :{{ name }}</h1>
  5. {% else %}
  6. <h1>Upload new File</h1>
  7. {% end %}
  8. <form method=post id="form" action="/" enctype=multipart/form-data>
  9. <input type="file" id="file" name="file">
  10. </form>
  11. <script>
  12. document.getElementById("file").onchange = function(){document.getElementById("form").submit();};
  13. const form = document.getElementById("form");
  14. const fileInput = document.getElementById("file");
  15. window.addEventListener('paste', e => {
  16. fileInput.files = e.clipboardData.files;
  17. setTimeout(function(){document.getElementById("form").submit();},4000)
  18. });
  19. </script>
  20. {% if name %}
  21. <img src='/uploads/{{name}}.avif' width="500" height="600" alt="sneed" onclick="document.getElementById('file').click();" />
  22. <button onclick="window.location.href='/sendcock_enter'" style="width: 500px; height: 600px;">hotkey: press Enter, (on computeer)</button>
  23. <!-- <button onclick="(xhr=new XMLHttpRequest()).open('GET','/sendcock_enter',1);xhr.send()" style="width:500px;height:600px;">Go to God</button> -->
  24. {% end %}