Forums

User uploaded images not displaying in browser

Hi, my flask app has the following setting on my flask.cfg file

MEDIA_ROOT = '/home/ujahdotpy/bulk/bulkieshare/project/static/img'
MEDIA_URL = '/img/'

And on my web tab I have my URL and Directory as:

/home/ujahdotpy/bulk/bulkieshare/project/static/img

/img/

But user uploaded images are not displaying on the browser but in my 'img' folder. I hosted the flask app for free though.

What am I doing wrong or what did I missed?

Try adding a slash at the end of the file path: /home/ujahdotpy/bulk/bulkieshare/project/static/img/

Thanks a lot @Dullgo but it worked only on the host my device. When I try it on another device it doesn't work

Try removing the static file mapping from your web tab, reload the web app, and see what happens

@dullgo, I did like you suggested but it didn't change

@ujahdotpy is your question the same question as your post here?

no wonder i'm experiencing deja vu...

@conrad, yes but related

no

La photo de profil et les icones "fas" ne s'affichent pas dans le cv généré de mon applicaton web flask. Vous pouvez m'aider svp

La photo de profil et les icones "fas" ne s'affichent pas dans mon application web flask. Aidez-moi!!

This is a super old thread. Maybe create a new thread with more details of the more your having