UploadHtml » 이력 » 버전 1
이름없음, 2024/01/17 12:18
| 1 | 1 | 이름없음 | h1. UploadHtml |
|---|---|---|---|
| 2 | |||
| 3 | 광고 페이지에 사용할 HTML 파일을 업로드합니다. |
||
| 4 | |||
| 5 | *Martipart-Form 요청 형식* |
||
| 6 | |||
| 7 | | key | type | description | |
||
| 8 | | file | File | 업로드 할 파일 %{color: #ff0000;}(txt 확장자 저장 불가능)% | |
||
| 9 | | operations | Text(one-line) | 표준 GraphQL Post 요청 형식에 따른 쿼리를 작성합니다. | |
||
| 10 | |||
| 11 | --- |
||
| 12 | |||
| 13 | <pre><code class="java"> |
||
| 14 | uploadImage( |
||
| 15 | did: String |
||
| 16 | ): UploadLocationResponse |
||
| 17 | </code></pre> |
||
| 18 | |||
| 19 | *did* |
||
| 20 | |||
| 21 | | field | type | description | |
||
| 22 | | did | String | snplab 또는 b2b의 did | |
||
| 23 | |||
| 24 | *UploadLocationResponse* |
||
| 25 | |||
| 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 | --- |
||
| 37 | |||
| 38 | *Request Example* |
||
| 39 | |||
| 40 | <pre> |
||
| 41 | { |
||
| 42 | "query": "mutation($did: String) {uploadHtml(did: $did){ command result{ originalFilename fullUrlPath } }}", |
||
| 43 | "variables": { |
||
| 44 | "did": "HmxD2jgZhBWEGcBnC66Kja" |
||
| 45 | } |
||
| 46 | } |
||
| 47 | </pre> |
||
| 48 | |||
| 49 | *Response Example* |
||
| 50 | |||
| 51 | <pre> |
||
| 52 | { |
||
| 53 | "data": { |
||
| 54 | "uploadHtml": { |
||
| 55 | "command": "uploadHtml", |
||
| 56 | "result": [ |
||
| 57 | { |
||
| 58 | "originalFilename": "cc.html", |
||
| 59 | "fullUrlPath": "https://cdn.myd.world/cec283c40561141e910b094a5469ed24/html/Yu8e71/cc.zip" |
||
| 60 | } |
||
| 61 | ] |
||
| 62 | } |
||
| 63 | } |
||
| 64 | }</pre> |