Skip to content

Commit

Permalink
Updated readme for properly importing the module
Browse files Browse the repository at this point in the history
There is no clear declaration how to import the module and it's really confusing for new comers.
  • Loading branch information
ujjwalbe authored Sep 22, 2021
1 parent 85ebd7a commit 768c024
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 768c024

Please # to comment.