I am trying to get the images uploaded to the form by the user to then be stored in the original static file. However, once the user uploads them, they are stored in a new static file rather than the original one created.
File structure
- Shop
- baskets
- goods
- owner
- static (where I want the images to go)
- styles.css
- templates
- init.py
- static (where they are instead going)
- images
- app.py
init.py
app.config['UPLOADED_IMAGES_DEST'] = 'static/images'
images = UploadSet('images', IMAGES)
configure_uploads(app, images)
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
The form and actual uploading of the images works fine, it's just they are being uploaded in the wrong location so when I try and reference the image in HTML using Jinja it does not work.
I have tried watching videos and know its something to do with the first line in init.py however am not sure how to get the directory that would link to the original static file.
How would I go about uploading it to the static file within Shop instead? Thanks in advance.