From 768c0242558df3fe3a7a5c92533a2285cca3b3b9 Mon Sep 17 00:00:00 2001 From: Ujjwal Biswas <29977681+ujjwalbe@users.noreply.github.com> Date: Wed, 22 Sep 2021 21:22:05 +0530 Subject: [PATCH] Updated readme for properly importing the module There is no clear declaration how to import the module and it's really confusing for new comers. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 973f686..8a322f8 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ pip install flask-file-upload #### General Flask config options (Important: The below configuration variables need to be set before initiating `FileUpload`) ````python +from flask_file_upload.file_upload import FileUpload +from os.path import join, dirname, realpath + # This is the directory that flask-file-upload saves files to. Make sure the UPLOAD_FOLDER is the same as Flasks's static_folder or a child. For example: app.config["UPLOAD_FOLDER"] = join(dirname(realpath(__file__)), "static/uploads")