File Upload with Flask

    0

    1

    Python Flask

    Library: flask

    Shortcut: flask.upload-file

    from flask import request
    
    @app.route('/route', methods=['GET', 'POST'])
    def upload_file():
      if request.method == 'POST':
        f = request.files['thefile']
        f.save(path)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.