forked from louiz/plzimg
-
Notifications
You must be signed in to change notification settings - Fork 0
Very simple image hosting application in python
License
itbane/plzimg
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
_ _ _ __ | |___(_)_ __ ___ __ _ | '_ \| |_ / | '_ ` _ \ / _` | | |_) | |/ /| | | | | | | (_| | | .__/|_/___|_|_| |_| |_|\__, | |_| |___/ Homepage: http://dev.louiz.org/projects/plzimg Plzimg is a very simple and lightweight web application, without any database, that lets users upload their images. It is developed in python3 and uses the Flask framework. It doesn't provide any way to search for uploaded images, or even to list them. It is not possible to remove, tag or describe the images. Just upload the image, use the URL somewhere, do not lose it, and that’s it. ================ Install ================ You need python3-flask and python3-pillow (to resize the uploaded images). Simply create two directories, one for each size of image: o/ for the original images s/ for the resized images You can test the application by running $ python3 app.py This will start a test server running on port 5000, but it is not suitable for production. If you want to deploy it on your web server, please refer to one of the methods described on http://flask.pocoo.org/docs/deploying/ Deploying per Ansible is possible via [this role](https://github.com/itbane/plzimg). Make sure the app itself cannot be accessed via the webserver! Example config: **/etc/uwsgi/plzimg.ini** ~~~ini [uwsgi] socket = 127.0.0.1:5000 master = True plugin = python chdir = /usr/local/lib/plzimg module = app:app processes = 2 uid = plzimg gid = plzimg ~~~ **/etc/nginx/sites/img.b4ne.de.conf** ~~~ server { # you will want some SSL config, I guess ;-) root /usr/local/lib/plzimg/o; client_max_body_size 100m; location @pix { include uwsgi_params; uwsgi_pass 127.0.0.1:5000; } location /s/ { root /usr/local/lib/plzimg; } location / { try_files $uri @pix; } } ~~~ ================ Authors ================ Original work: Florent Le Coz (louiz’) <louiz@louiz.org> Changes to get image-links w\o `/o/` prefix: Jascha Sticher (itbane) <dev@b4ne.de> ================= Contact/Support ================= Report a bug: http://dev.louiz.org/projects/plzimg/issues/new ================= Licence ================= Plzimg is Free Software. (learn more: http://www.gnu.org/philosophy/free-sw.html) Plzimg is released under the zlib license. Please read the COPYING file for details.
About
Very simple image hosting application in python
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 45.1%
- CSS 31.9%
- HTML 23.0%