프로젝트

일반

사용자정보

UploadImage » 이력 » 버전 7

이름없음, 2021/06/04 06:40

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