imgupload is a Flask + uWSGI application to serve as an all-purpose image uploader over POST requests.
Where can I send bug reports and feature requests?
You can create an issue here.
How do I use this program?
See Installation
I want to make a pull request. Where should I do that?
First, fork the repository. Then, commit your changes to your fork, and create a pull request.
python3
python3-pip
python3-venv
git
(for easy updating)
Note: replace www-data
with whatever user your webserver runs as.
- Go to /srv:
cd /srv
- Clone the repository:
git clone https://github.com/BBaoVanC/imgupload.git
- Change ownership of /srv/imgupload:
sudo chown -R www-data: /srv/imgupload
- Enter www-data user:
sudo su www-data
- Change directories to /srv/imgupload:
cd /srv/imgupload
- Checkout the version you want (replace [version] with desired version tag:
git checkout [version]
- Create a virtualenv:
python3 -m venv env
- Enter the virtualenv:
source env/bin/activate
- Install dependencies:
python3 -m pip install -r requirements.txt
- Leave the www-data user:
exit
- Copy the default uWSGI configuration:
sudo cp /srv/imgupload/uwsgi.ini.default /etc/uwsgi/apps-available/imgupload.ini
- Modify
/etc/uwsgi/apps-available/imgupload.ini
to your preferences - Enable imgupload:
sudo ln -s /etc/uwsgi/apps-available/imgupload.ini /etc/uwsgi/apps-enabled/
- Restart uWSGI:
sudo systemctl restart uwsgi
- Set up your webserver to proxy the uwsgi.sock
Example NGINX location block:
location /upload {
include uwsgi_params;
uwsgi_pass unix:/srv/imgupload/uwsgi.sock;
client_max_body_size 25M;
}
git clone https://github.com/BBaoVanC/imgupload.git
cd imgupload
python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt
export FLASK_APP=imgupload.py
flask run
imgupload is licensed under the GPLv3 license. For more information, please refer to LICENSE
for more information.