graphql-python / graphql-python/flask-graphql
File Upload
- Ngôn ngữ chính
- Python
- Star
- 1.3k
- Fork
- 139
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm working on an [example repo](https://github.com/savovs/flask-graphene-hello) and was wondering, what would be the simplest way to implement that? This is what I tried without GraphQL:
```python
@app.route('/upload', methods=['POST'])
def uploadFile():
for key in request.files:
file = request.files[key]
file.save(os.path.join(UPLOAD_FOLDER, file.filename))
return 'uploaded'
```
[This is what](https://github.com/jaydenseric/apollo-upload-server) I used in Node.js, would love to do something like that for Flask in Python.
If it's not supported by flask-graphql I'd be happy to work on a pull request. Also, how would you test this without a browser, using Graphiql, Postman or something like that?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.