/i.vas3k.ru

One-page script for easy uploading, resizing and inserting pictures to blog

Primary LanguagePython

i.vas3k.ru

Old and simple script which helps me to upload, resize and insert pictures to my blog

Does many handy things using a bit of nginx X-Accel-Redirect magic. Can resize pictures on the go and distribute the final result through nginx.

Written on Flask. Uses Pillow for image processing and PostgreSQL for statistics. Yes, the usage of postgres here is overkill, but the previous version on plain-files constantly became inconsistent and I rewrote everything.

Almost all logic sits in one file (app.py). Also see settings.py before you go. Images can be uploaded through a simple web-interface (sits on the root) or using any script. Works both with multipart-form-data files and raw bytes uploading.

Here is some examples how everything works: