Open gem-yours opened 4 years ago
request format (postman)
{
"info": {
"_postman_id": "2ac54f52-d203-4090-925e-7937871e8cea",
"name": "velkoz",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "http://localhost:8000/velkoz/",
"protocolProfileBehavior": {
"disabledSystemHeaders": {}
},
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "query",
"value": "mutation {uploadImage(file: \"file\") {success}}",
"type": "text"
},
{
"key": "map",
"value": "{\"0\": [\"test.txt\"]}",
"type": "text"
},
{
"key": "operationName",
"value": "testMutation",
"type": "text",
"disabled": true
},
{
"key": "file",
"type": "file",
"src": "/home/yuya/Downloads/test.txt"
},
{
"key": "variables",
"value": "{\"file\": \"hoge\"}",
"type": "text",
"disabled": true
}
]
},
"url": {
"raw": "http://localhost:8000/velkoz/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8000",
"path": [
"velkoz",
""
]
}
},
"response": []
}
]
}
Save champions image to random path. And let database to store it.