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

Add file_upload optional argument to engine's init_app method #133

Closed anomam closed 5 years ago

anomam commented 5 years ago

Hi @gouthambs ,

Thank you for this awesome project. I believe this very small change could solve some complications for flask users who use the application factory pattern and who would like to use S3 storage for static files as well, as shown in your example here.

The goal is to just be able to do:

...
blog_engine = BloggingEngine()
...
def create_app(config):
    ...
    s3storage = S3Storage(app)
    file_upload = FlaskFileUpload(app, storage=s3storage)
    blog_engine.init_app(app, storage, file_upload=file_upload)
    ...

Let me know what you think!

gouthambs commented 5 years ago

@anomam :+1:

anomam commented 5 years ago

Thanks a lot for the quick merger @gouthambs Any chance you would have a new release date in mind already?

gouthambs commented 5 years ago

available with v1.2.2. I just made a release.