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