escrichov / manage-images

Upload images to the server and download them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Manage Images

Upload images to the server and download them.

Develop

Create virtualenv

virtualenv env

Install requirements

env/bin/pip install -r requirements.txt

Run tests

env/bin/nosetests

Run test server

env/bin/python app.py

Run production server

env/bin/uwsgi --http :8000 --wsgi-file app.py

Install httpie

brew install httpie

Upload images

http POST localhost:8000/images Content-Type:image/jpeg < tests/fixtures/image.jpeg 
http POST localhost:8000/images Content-Type:image/png < tests/fixtures/image.png
http POST localhost:8000/images Content-Type:image/gif < tests/fixtures/image.gif

Get images

curl localhost:8000/images/20cb8df6412111e5a0f80242ac11000c.jpeg > image.jpeg

Deploy

Docker deployment

About

Upload images to the server and download them.

License:MIT License


Languages

Language:Python 100.0%