diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | main.py | 4 |
2 files changed, 6 insertions, 0 deletions
| @@ -93,6 +93,8 @@ If you want to add/remove dependencies you have to rebuild the container. | |||
| 93 | 93 | ||
| 94 | # RESTful API | 94 | # RESTful API |
| 95 | 95 | ||
| 96 | If you go to https://matweb.info/apidocs you can find a Swagger documentation. | ||
| 97 | |||
| 96 | ## Upload Endpoint | 98 | ## Upload Endpoint |
| 97 | 99 | ||
| 98 | **Endpoint:** `/api/upload` | 100 | **Endpoint:** `/api/upload` |
| @@ -14,6 +14,10 @@ def create_app(test_config=None): | |||
| 14 | app.config['UPLOAD_FOLDER'] = os.environ.get('MAT2_WEB_DOWNLOAD_FOLDER', './uploads/') | 14 | app.config['UPLOAD_FOLDER'] = os.environ.get('MAT2_WEB_DOWNLOAD_FOLDER', './uploads/') |
| 15 | app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB | 15 | app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB |
| 16 | app.config['CUSTOM_TEMPLATES_DIR'] = 'custom_templates' | 16 | app.config['CUSTOM_TEMPLATES_DIR'] = 'custom_templates' |
| 17 | app.config['SWAGGER'] = { | ||
| 18 | 'title': 'Mat2 Web API', | ||
| 19 | 'version': '1.0.0', | ||
| 20 | } | ||
| 17 | # optionally load settings from config.py | 21 | # optionally load settings from config.py |
| 18 | app.config.from_object('config') | 22 | app.config.from_object('config') |
| 19 | 23 | ||
