UploadResource » 이력 » 버전 3
이름없음, 2021/06/04 04:41
1 | 3 | 이름없음 | h1. UploadResource |
---|---|---|---|
2 | |||
3 | *Martipart-Form 요청 형식* |
||
4 | |||
5 | | key | type | description | |
||
6 | | file | File | 업로드 할 파일 %{color: #ff0000;}(확장자 표시해주기)% | |
||
7 | | operations | Text(one-line) | 표준 GraphQL Post 요청 형식에 따른 쿼리를 작성합니다. | |
||
8 | |||
9 | h2. *요청 필드* |
||
10 | |||
11 | <pre><code class="c"> |
||
12 | uploadResource( |
||
13 | uploadResourceRequest: UploadResourceRequest |
||
14 | ): UploadLocationResponse |
||
15 | </code></pre> |
||
16 | |||
17 | | field | type | description | |
||
18 | | did | String | b2b의 did | |
||
19 | |||
20 | *응답 필드* |
||
21 | |||
22 | | field | type | description | |
||
23 | | command | String | 응답 Command 종류 | |
||
24 | | originalFilename | String | 업로드 한 파일 이름 | |
||
25 | | fullUrlPath | String | 저장된 경로 | |
||
26 | |||
27 | *요청 예시* |
||
28 | |||
29 | <pre> |
||
30 | {"query":"mutation($did: String){uploadImage(did: $did){command result{originalFilename fullUrlPath}}}","variables":{"did":"HmxD2jgZhBWEGcBnC66Kja"}} |
||
31 | </pre> |
||
32 | |||
33 | *응답 예시* |
||
34 | |||
35 | <pre> |
||
36 | { |
||
37 | "data": { |
||
38 | "uploadImage": { |
||
39 | "command": "uploadImage", |
||
40 | "result": [ |
||
41 | { |
||
42 | "originalFilename": "100.jpg", |
||
43 | "fullUrlPath": "https://cdn.myd.world/6f9b5a50b175e81cf2892b6da61d21af/images/GTfQBO/100.jpg" |
||
44 | } |
||
45 | ] |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 | </pre> |