Created
March 16, 2017 19:00
-
-
Save pcote/d96b46a2a734a3ff44419ec88fd5f47d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.config["UPLOAD_FOLDER"] = "uploads" | |
@app.route("/sendfile", methods=["POST"]) | |
def send_file(): | |
fileob = request.files["file2upload"] | |
filename = secure_filename(fileob.filename) | |
save_path = "{}/{}".format(app.config["UPLOAD_FOLDER"], filename) | |
fileob.save(save_path) | |
return "successful_upload" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment