-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
24 lines (18 loc) · 757 Bytes
/
app.py
File metadata and controls
24 lines (18 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# coding=utf-8
from flask import Flask, render_template
from pdfmerge.merge import pdfmerge
from pdfsplit.split import pdfsplit
from pdfconvert.convert import pdfconvert
app = Flask(__name__)
app.register_blueprint(pdfsplit, url_prefix = '/pdfsplit')
app.register_blueprint(pdfmerge, url_prefix = '/pdfmerge')
app.register_blueprint(pdfconvert, url_prefix = '/pdfconvert')
app.config['ALLOWED_EXTENSIONS'] = {'pdf'}
app.config['ALLOWED_EXTENSIONS_IMG'] = {'jpg', 'jpeg', 'png'}
app.config['MAX_CONTENT_LENGTH'] = 50 * 1024 * 1024 #16MB
app.config['UPLOAD_FOLDER'] = 'tmp/'
@app.route('/family', strict_slashes=False)
def choice():
return render_template('choice.html')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8800, debug=True)