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