UploadImage » 이력 » 버전 1
이름없음, 2024/01/17 12:18
| 1 | 1 | 이름없음 | h1. UploadImage |
|---|---|---|---|
| 2 | |||
| 3 | 광고 페이지에 사용할 이미지 파일을 업로드 합니다. |
||
| 4 | |||
| 5 | *Martipart-Form 요청 형식* |
||
| 6 | |||
| 7 | | key | type | description | |
||
| 8 | | file | File | 업로드 할 파일 %{color: #ff0000;}(확장자 제한 없습니다)% | |
||
| 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 유형 (값: "uploadImage") | |
||
| 28 | | originalFilename | String | 업로드 한 파일 이름 | |
||
| 29 | | fullUrlPath | String | 저장된 경로 | |
||
| 30 | |||
| 31 | --- |
||
| 32 | |||
| 33 | *Request Example* |
||
| 34 | |||
| 35 | <pre> |
||
| 36 | { |
||
| 37 | "query": "mutation($did: String) {uploadImage(did: $did){ command result{ originalFilename fullUrlPath } }}", |
||
| 38 | "variables": { |
||
| 39 | "did": "HmxD2jgZhBWEGcBnC66Kja" |
||
| 40 | } |
||
| 41 | } |
||
| 42 | </pre> |
||
| 43 | |||
| 44 | *Response Example* |
||
| 45 | |||
| 46 | <pre> |
||
| 47 | { |
||
| 48 | "data": { |
||
| 49 | "uploadImage": { |
||
| 50 | "command": "uploadImage", |
||
| 51 | "result": [ |
||
| 52 | { |
||
| 53 | "originalFilename": "100.jpg", |
||
| 54 | "fullUrlPath": "https://cdn.myd.world/6f9b5a50b175e81cf2892b6da61d21af/images/GTfQBO/100.jpg" |
||
| 55 | } |
||
| 56 | ] |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 | </pre> |