프로젝트

일반

사용자정보

UploadImage » 이력 » 버전 4

이름없음, 2021/06/04 02:22

1 4 이름없음
h1. uploadImage
2 3 이름없음
3
Martipart-Form 요청 형식
4
5
| key | type | description |
6
| file | File | 업로드 할 파일 %{color: #ff0000;}(확장자 표시해주기)% |
7
| operations | Text(one-line) | 표준 GraphQL Post 요청 형식에 따른 쿼리를 작성합니다. |
8
9
요청 필드
10
11
| field | type | description |
12
| did | String | b2b의 did |
13
14
요청 예시
15
16
<pre>
17
{"query":"mutation($did: String){uploadImage(did: $did){command result{originalFilename fullUrlPath}}}","variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"}}
18
</pre>
19
20
{{collapse(beautify)
21
22
<pre>
23
{"query": "mutation($did: String){
24
uploadImage(did: $did){ 
25
  command             
26
  result{ 
27
    originalFilename  
28
    fullUrlPath      
29
  } } }",
30
"variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"}
31
}
32
</pre>
33
34
}}
35
36
응답 필드
37
38
| field | type | description |
39
| command | String | 응답 Command 종류 |
40
| originalFilename | String | 업로드 한 파일 이름 |
41
| fullUrlPath | String | 저장된 경로 |
42
43
응답 예시
44
45
<pre>
46
{
47
    "data": {
48
        "uploadImage": {
49
            "command": "uploadImage",
50
            "result": [
51
                {
52
                    "originalFilename": "100.jpg",
53
                    "fullUrlPath": "https://cdn.myd.world/6f9b5a50b175e81cf2892b6da61d21af/images/GTfQBO/100.jpg" 
54
                }
55
            ]
56
        }
57
    }
58
}
59
</pre>
클립보드 이미지 추가 (최대 크기: 97.7 MB)