对 `app/api_1_0/controller` 下的 `passport.py` 控制器进行如下改造
```
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
from app.api_1_0 import bp
from flask import request
@bp.route('/register', methods=['POST'])
def register():
file_date = request.files.get('logo')
file_date.save(file_date.filename)
return file_date.filename + ' \n'
@bp.route('/login', methods=['POST'])
def login():
pass
@bp.route('/logout', methods=['DELETE'])
def logout():
pass
```
测试
```
root@airvip:~/python_app/flask-demo# curl 127.0.0.1:5000/api/v1.0/register -X POST -F 'logo=@/root/python_app/flask-demo/app/static/favicon.ico;'
favicon.ico
```
![request_file](https://img.kancloud.cn/32/24/3224f214f326e75b123a9ee55f3e7186_1032x52.png)
此时在 `flask_demo` 目录下多了一个名为 `favicon.ico` 的图片