gouthambs / Flask-Blogging

A Markdown Based Python Blog Engine as a Flask Extension.
http://flask-blogging.readthedocs.org/en/latest/
MIT License
688 stars 159 forks source link

How to upload images #118

Closed ayanray089 closed 5 years ago

ayanray089 commented 6 years ago

Hi, I want to upload images in the blog from my local folder. Can you give me some samples/examples how to do that.

Thanks!

gouthambs commented 6 years ago

There is a BLOGGING_ALLOW_FILEUPLOAD setting that will enable one to upload images. This needs to be enabled. The quickstart example here should be a good start: http://flask-blogging.readthedocs.io/en/latest/#quick-start-example

ayanray089 commented 6 years ago

Thanks @gouthambs for your reply! I enabled BLOGGING_ALLOW_FILEUPLOAD and it am able upload images and store inside static/upload directory. But , I am not able attach the same image in my blog. I am trying to click the insert image hyperlink and enter the path "/static/upload/.png". Nothing is happening. Can you please suggest if I need to do anything differently.

Thanks!

ayanray089 commented 6 years ago

So, it works when I manually type the following Image1. But it doesn't work through the "Insert image hyperlink" icon in the tools bar. I want to make it work through the icon. Can you please suggest how to fix it.