Handling File Uploads With Flask - miguelgrinberg.com

PHOTO EMBED

Tue Sep 06 2022 12:23:03 GMT+0000 (Coordinated Universal Time)

Saved by @Rmin #html #form #uploadfile

    <input type="file" name="doc_file" accept=".doc,.docx">
    <input type="file" name="image_file" accept="image/*">
content_copyCOPY

can be used to filter the allowed file types that can be selected, either by file extension or by media type.

https://blog.miguelgrinberg.com/post/handling-file-uploads-with-flask