mgek picture bed project, a flask simple picture bed
Based on flask1.0.3, sqlite database development, you need to be able to switch to mongoDB in the configuration file, a small localized image bed. All services are based on local public image bed services without connection. It supports user login, multi-file upload, image preview, and batch editing. , batch deletion, batch download, batch picture direct link generation
#2
Update time 2019.8.28
Optimized the button display logic for batch editing, and the click effect of the cancel button is more perfect.
Optimized the display logic of images and sorted them according to the latest upload time
Added a new Ajax asynchronous upload page to add an upload progress bar . Visit ajax_upload to enter the new upload page.
Added about interface
Update time 2019.8.30
Add a login page and improve the login system
Added batch image direct link acquisition page
Optimize the upload page display, use partial refresh, and the image data will be updated immediately after uploading
git clone https://github.com/Landers1037/mgekimghost.git
#在项目目录下运行flask shell
$ flask shell
$ from app import db
$ db.create_all () #初始化数据库
pip install -r requirements.txt
python app.py
# ### if linux with nginx&gunicorn ###
sh start.sh
View local port 5000
start.sh
content
#! /bin/bash
nohup gunicorn -w 2 -b 127.0.0.1:5000 --reload app:app &
echo " check port 5000 "
Need to configure listening port 5000 on nginx
Main page
upload
Batch editing
Picture details page
delete
Upload history
New version upload page (ajax)
About page
Direct chain batch extraction
Login page
database
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os . path . join ( os . getcwd (), 'img.db' )
The default is sqlite, you can comment out this sentence and add the mongoDB database
Demo picture from wlop
Author of this application Landers
My homepageLanders1037