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