Snippets Collections
<html>
  <head>
    <title>File Upload</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.7.1/min/dropzone.min.css">
  </head>
  <body>
    <h1>File Upload</h1>
    <form action="{{ url_for('upload_files') }}" class="dropzone">
    </form>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.7.1/min/dropzone.min.js"></script>
  </body>
</html>
<!doctype html>
<html>
  <head>
    <title>File Upload</title>
  </head>
  <body>
    <h1>File Upload</h1>
    <form method="POST" action="" enctype="multipart/form-data">
      <p><input type="file" name="file"></p>
      <p><input type="submit" value="Submit"></p>
    </form>
    <hr>
    {% for file in files %}
      <img src="{{ url_for('upload', filename=file) }}" style="width: 64px">
    {% endfor %}
  </body>
</html>
star

Tue Sep 06 2022 13:31:07 GMT+0000 (Coordinated Universal Time) https://blog.miguelgrinberg.com/post/handling-file-uploads-with-flask

#html #flask #uploadform
star

Tue Sep 06 2022 13:20:51 GMT+0000 (Coordinated Universal Time) https://blog.miguelgrinberg.com/post/handling-file-uploads-with-flask

#html #uploadform #flask

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension