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