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