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