

アカウントには所有しているデバイスなどに応じてリポジトリというクラウド上の容量が与えられ  
任意のファイルをupload/downloadが可能です。

また、REST APIでのupload/downloadが可能になっています。

## アップロード

リポジトリにファイルをアップロードします。存在する場合は上書きします。

```
POST /users/me/repo/{file_name}
```

### Request Parameter

| Name | Type | Optional | Description |
|:-|:-|:-|:-|
| access\_token | Cookie | Required | String of user's access token |
| file | Body/Multipart-form | Required | The file to be uploaded |

### Response

json format.

| Status | Description |
|:-|:-|
| 200 | Success |
| 400 | Format Error |
| 403 | Invalid access token / capacity full |

## ダウンロード

リポジトリからファイルをダウンロードします

```
GET /users/me/repo/{file_name}
```

or

```
GET /users/{user_id}/repo/{file_name}
```

### Request Parameter

| Name | Type | Optional | Description |
|:-|:-|:-|:-|
| access\_token | Cookie | Optional | String of user's access token |

### Response

File it self. octet-stream.

| Status | Description |
|:-|:-|
| 200 | Success |
| 403 | Invalid access token / capacity full |
| 404 | Not Found |

